
* PLEASE use your own path to access the dataset Uk_elec_comm.csv
clear
set more off
set max_memory .
set matsize 3800
insheet using "G:\My Drive\Meanma\Badanie\Funduszy\2017-18\Sasana\Wlasnosc\Uk_elec_comm.csv", comma

* Clean value

gen valuen = subinstr(value, "£","",.)
replace valuen = subinstr(valuen, ",","",.)
destring valuen, replace
drop value
rename valuen value
rename value con_value

sort donorname

* Cleaning donorname

replace donorname=subinstr(donorname, "Limited", "Ltd",.)
replace donorname=subinstr(donorname, "LTD", "Ltd",.)
replace donorname=subinstr(donorname, "Ltd.", "Ltd",.)
replace donorname=subinstr(donorname, "LTD.", "Ltd",.)
replace donorname=subinstr(donorname, "Mimited", "Ltd",.)

replace donorname=subinstr(donorname, "PLC", "Plc",.)
replace donorname=subinstr(donorname, "P.L.C.", "Plc",.)
replace donorname=subinstr(donorname, "P.l.c.", "Plc",.)

replace donorname=subinstr(donorname, "and Son", "& Son",.)
replace donorname=subinstr(donorname, "and son", "& Son",.)
replace donorname=subinstr(donorname, "& son", "& Son",.)

replace donorname=subinstr(donorname, "& Co.", "& Co",.)
replace donorname=subinstr(donorname, "& Company", "& Co",.)
replace donorname=subinstr(donorname, "and Company", "& Co",.)
replace donorname=subinstr(donorname, "and co", "& Co",.)
replace donorname=subinstr(donorname, "and co.", "& Co",.)
replace donorname=subinstr(donorname, "and company", "& Co",.)

replace donorname=subinstr(donorname, "Mr ", "",.)
replace donorname=subinstr(donorname, "Mrs ", "",.)
replace donorname=subinstr(donorname, "Ms ", "",.)
replace donorname=subinstr(donorname, "Sir", "",.)

replace donorname=subinstr(donorname, "The ", "",.)

replace donorname=subinstr(donorname, " A. ", " A ",.)
replace donorname=subinstr(donorname, " B. ", " B ",.)
replace donorname=subinstr(donorname, " C. ", " C ",.)
replace donorname=subinstr(donorname, " D. ", " D ",.)
replace donorname=subinstr(donorname, " E. ", " E ",.)
replace donorname=subinstr(donorname, " F. ", " F ",.)
replace donorname=subinstr(donorname, " G. ", " G ",.)
replace donorname=subinstr(donorname, " H. ", " H ",.)
replace donorname=subinstr(donorname, " I. ", " I ",.)
replace donorname=subinstr(donorname, " J. ", " J ",.)
replace donorname=subinstr(donorname, " K. ", " K ",.)
replace donorname=subinstr(donorname, " L. ", " L ",.)
replace donorname=subinstr(donorname, " M. ", " M ",.)
replace donorname=subinstr(donorname, " N. ", " N ",.)
replace donorname=subinstr(donorname, " O. ", " O ",.)
replace donorname=subinstr(donorname, " P. ", " P ",.)
replace donorname=subinstr(donorname, " Q. ", " Q ",.)
replace donorname=subinstr(donorname, " R. ", " R ",.)
replace donorname=subinstr(donorname, " S. ", " S ",.)
replace donorname=subinstr(donorname, " T. ", " T ",.)
replace donorname=subinstr(donorname, " U. ", " U ",.)
replace donorname=subinstr(donorname, " V. ", " V ",.)
replace donorname=subinstr(donorname, " W. ", " W ",.)
replace donorname=subinstr(donorname, " X. ", " X ",.)
replace donorname=subinstr(donorname, " Y. ", " Y ",.)
replace donorname=subinstr(donorname, " Z. ", " Z ",.)
replace donorname=subinstr(donorname, "A. B. ", "A B ",.)
replace donorname=subinstr(donorname, "A.B. ", "A B ",.)

replace donorname=subinstr(donorname, "LlP", "LLP",.)

replace donorname=subinstr(donorname, "Gp", "Group",.)

replace donorname=subinstr(donorname, "Women's", "Womens",.)

replace donorname=subinstr(donorname, "Assoc ", "Association ",.)

replace donorname=strltrim(donorname)


* Reduce overcounting due to typos and variations.  
* If different companies share ownership and control it is reasonable to count them as one. 
* If almost identically-named individuals contribute to the same a/c unit (other than Central Party), it is assumed they are one person.

replace donorname="A B Produce Plc" if donorname=="A B Produce"
replace donorname="A B Produce Plc" if donorname=="A.B.Produce"
replace donorname="A B Produce Plc" if donorname=="AB Produce"

replace donorname="A & H Developers Ltd" if donorname=="A&H Developers Ltd"

replace donorname="A & S Leisure Group Ltd" if donorname=="A & S Lesisure Group Ltd"

replace donorname="Abbey Business Centres Ltd" if donorname=="Abbey Business Centres"
replace donorname="Abbey Business Centres Ltd" if donorname=="Abbey Business Centre Ltd"

replace donorname="Albert Buildings Ltd" if donorname=="Albert Buldings Ltd"
replace donorname="Albert Buildings Ltd" if donorname=="Albert Buidlings Ltd"
replace donorname="Albert Buildings Ltd" if donorname=="Albert Buildings Co Ltd"

replace donorname="Abercrombie & Kent Ltd" if donorname=="Abercrombie and Kent Ltd"

replace donorname="Airbus Group Ltd" if donorname=="Airbus UK Ltd"
replace donorname="Airbus Group Ltd" if donorname=="Airbus Operations Ltd"
replace donorname="Airbus Group Ltd" if donorname=="EADS-UK Ltd"


* Both donating to Finchley
replace donorname="Alison Frost" if donorname=="Alison A Frost"

replace donorname="Altitude Broadcasting and Corporate Studios Ltd" if donorname=="Altitude Broadcasting & Corporate Studios Ltd"

replace donorname="Andrea Leadsom" if donorname=="Andrea J Leadsom"

replace donorname="Angela AB Yeoman" if donorname=="Angela B Yeoman"

replace donorname="Area Properties" if donorname=="Area Properties Ltd"

replace donorname="ASDA Stores Ltd" if donorname=="Asda Stores Ltd"

replace donorname="ASDA Stores Ltd" if donorname=="Asda Stores Ltd"

replace donorname="Avanti Communications Ltd" if donorname=="Avanti Communications"


replace donorname="Association of Conservative Clubs" if donorname=="Association of Conservative Clubs Ltd"

replace donorname="B&S Property Ltd" if donorname=="B&S Properties (London) Ltd"

replace donorname="Barbara Yerolemu" if donorname=="Barbara C Yerolemou"

replace donorname="Bearwood Corporate Services Ltd" if donorname=="Bearwood Coporate Services Ltd"
replace donorname="Bearwood Corporate Services Ltd" if donorname=="Bearwoord Coporate Services Ltd"
replace donorname="Bearwood Corporate Services Ltd" if donorname=="Bearwoord Coporate Services"

replace donorname="Bell Pottinger" if donorname=="Bell Pottinger Communications Ltd"
replace donorname="Bell Pottinger" if donorname=="Bell Pottinger Corporate & Financial Ltd"
replace donorname="Bell Pottinger" if donorname=="Bell Pottinger Public Affairs"
replace donorname="Bell Pottinger" if donorname=="Bell Pottinger Communications Ltd"
replace donorname="Bell Pottinger" if donorname=="Bell Pottinger Public Affairs Ltd"

replace donorname="Berkeley Burke" if donorname=="Berkeley Burke & Co Ltd"
replace donorname="Berkeley Burke" if donorname=="Berkeley Burke (Holdings) Ltd"
replace donorname="Berkeley Burke" if donorname=="Berkeley Burke (Remuneration Consultants) Ltd"
replace donorname="Berkeley Burke" if donorname=="Berkeley Burke Holdings Ltd"
replace donorname="Berkeley Burke" if donorname=="Burkeley Burke Holdings Ltd"
replace donorname="Berkeley Burke" if donorname=="Burkeley Burke Group Ltd"

replace donorname="Bestway" if donorname=="Bestaway Cash & Carry Ltd"
replace donorname="Bestway" if donorname=="Bestway (Holdings) Ltd"
replace donorname="Bestway" if donorname=="Bestway Cash & Carry Ltd"
replace donorname="Bestway" if donorname=="Bestway Cash and Carry Ltd"
replace donorname="Bestway" if donorname=="Bestway Northern Ltd"
replace donorname="Bestway" if donorname=="Bestway Wholesale Ltd"
replace donorname="Bestway" if donorname=="Bestaway Cash and Carry Ltd"

replace donorname="Biddulph Conservative & Unionist Club" if donorname=="Biddulph Conservative Club"

replace donorname="Bloomberg Tradebook Europe Ltd" if donorname=="Bloomberg Tradebrook Europe Ltd"
replace donorname="Bloomberg Tradebook Europe Ltd" if donorname=="Bloomberg Trading Facility Ltd"

replace donorname="Bonhams 1793 Ltd" if donorname=="Bonhams Ltd"

replace donorname="Boodle & Dunthorpe Ltd" if donorname=="Boodle & Dunthorne Ltd"

replace donorname="Brian A F Smith" if donorname=="Brian AF Smith"

replace donorname="British Asian Conservative Link" if donorname=="British Asian Conservatives Link"

replace donorname="Broadland Properties Ltd" if donorname=="Broadland Properties"

replace donorname="Bromfield Sand & Gravel Co Ltd" if donorname=="Bromfield Sand & Gravel Co. Ltd"
replace donorname="Bromfield Sand & Gravel Co Ltd" if donorname=="Bromfield Sand & Gravel Co. Ltd"
replace donorname="Bromfield Sand & Gravel Co Ltd" if donorname=="Bromfield Sand & Gravel"

replace donorname="Butterfield Signs Ltd" if donorname=="Butterfield Sign Service Ltd"

* Dudley South
replace donorname="Caledonia Investments Plc" if donorname=="Caledonia Group Services Ltd"

* Westminster North
replace donorname="Campbell Rigg Design Ltd" if donorname=="Campbell Rigg International Ltd"

replace donorname="Business Fore" if donorname=="BusinessFore"

replace donorname="C2HM Hill Services Ltd" if donorname=="CH2M Hill Services Ltd" 

replace donorname="Castle Rising Holdings Ltd" if donorname=="Castle Risings Holdings Ltd"

replace donorname="Canary Wharf Ltd" if donorname=="Canary Whaf Ltd"
replace donorname="Canary Wharf Ltd" if donorname=="Canary Wharf Plc"
replace donorname="Canary Wharf Ltd" if donorname=="Canary Wharf Plc"
replace donorname="Canary Wharf Ltd" if donorname=="Canary Wharf Group Plc"


replace donorname="Catherine Lagrange" if donorname=="Catharine Lagrange"

replace donorname="Cavendish Corporate Finance (UK) Ltd" if donorname=="Cavendish Corporate Finance Ltd"
replace donorname="Cavendish Corporate Finance (UK) Ltd" if donorname=="Cavendish Corporate Finance"
replace donorname="Cavendish Corporate Finance (UK) Ltd" if donorname=="Cavendish Corp Finance Ltd"
replace donorname="Cavendish Corporate Finance (UK) Ltd" if donorname=="Cavendish Corporate Finance LLP"

replace donorname="Charles Dugan-Chapman" if donorname=="Charles Duggan-Chapman"

* West Dorset
replace donorname="Charlotte Townshend" if donorname=="Charlotte Townsend"

replace donorname="Chester & County Unionist Buildings Ltd" if donorname=="Chester & County Unionist Building Ltd"
replace donorname="Chester & County Unionist Buildings Ltd" if donorname=="Chester and County Unionist Buildings Ltd"

replace donorname="Christofferson Robb & Co Ltd" if donorname=="Christofferson Robb & Co (UK) LLP"
replace donorname="Christofferson Robb & Co Ltd" if donorname=="Christofferson, Robb & Co (UK)"
replace donorname="Christofferson Robb & Co Ltd" if donorname=="Christofferson, Robb & Co (UK) LLP"

replace donorname="Churchill Retirement (Group) Ltd" if donorname=="Churchill Retirement Living Ltd"
replace donorname="Churchill Retirement (Group) Ltd" if donorname=="Churchill Retirement Plc"

replace donorname="Conservative Properties (Wavertree) Ltd" if donorname=="Conservative Properties Wavertree Ltd"

replace donorname="Country House Weddings Ltd" if donorname=="Country House Weddings"

replace donorname="Crescent Properties (Hampstead)" if donorname=="Crescent Properties (Hampstead) Ltd"
replace donorname="Crescent Properties (Hampstead)" if donorname=="Crescent Properties (Hampsted)"
replace donorname="Crescent Properties (Hampstead)" if donorname=="Crescent Properties Hampstead Ltd"
replace donorname="Crescent Properties (Hampstead)" if donorname=="Crescent Properties Hampstead"
replace donorname="Crescent Properties (Hampstead)" if donorname=="Crescent Properties (Hamsptead) Ltd"


replace donorname="CQS (UK) LLP" if donorname=="CQS Management Ltd"

replace donorname="Dashwood Finance Co Ltd" if donorname=="Dashwood Finance Company Ltd"

replace donorname="Dashwood Finance Co Ltd" if donorname=="Dashwood Finance Company Ltd"
replace donorname="Dashwood Finance Co Ltd" if donorname=="Dahwood Finance Co Ltd"

replace donorname="Dolar Popat" if donorname=="Doller Popat"
replace donorname="Dolar Popat" if donorname=="Lord Dolar Popat"
replace donorname="Dolar Popat" if donorname=="Lord Popat"

replace donorname="Delancey Real Estate Management Ltd" if donorname=="Delancy Real Estate Management Ltd"

replace donorname="Deloitte LLP" if donorname=="Deloitte MCS Ltd"

replace donorname="Dodson & Horrell Ltd" if donorname=="Dodson & Horrell Limited"

replace donorname="Duke of Bedford" if donorname=="Duke Andrew of Bedford"
replace donorname="Duke of Bedford" if donorname=="Duke na of Bedford"

replace donorname="Dunalastair Estates" if donorname=="Dunalastair Estates Ltd"

* Romsey
replace donorname="David AS Plastow" if donorname=="David A Plastow"

replace donorname="Deloitte LLP" if donorname=="Deloitte & Touche LLP"

replace donorname="Eddisbury Property Co Ltd" if donorname=="Eddisbury Property Company Ltd"

replace donorname="Empire Direct Ltd" if donorname=="Empire Direct Plc"

replace donorname="English Welsh and Scottish Railways Ltd" if donorname=="English Welsh and Scottish Railway Ltd" 
replace donorname="English Welsh and Scottish Railways Ltd" if donorname=="English Welsh & Scottish Railways Ltd"

replace donorname="Erinastar Ltd" if donorname=="Erinstar Ltd"

replace donorname="Estates U.K. Ltd" if donorname=="Estates UK Ltd"

replace donorname="Euro RSCG Apex Communications Ltd" if donorname=="Euro RSCG London Ltd"

replace donorname="Express Newspapers Ltd" if donorname=="Express Newspapers"

replace donorname="FIL" if donorname=="FIL Holdings (UK) Ltd"
replace donorname="FIL" if donorname=="FIL Holdings Ltd" 
replace donorname="FIL" if donorname=="FIL Investment Management Ltd"

replace donorname="FPE Global" if donorname=="FPE Global Ltd"
replace donorname="FPE Global" if donorname=="FPE Global (Holdings) Ltd"
replace donorname="FPE Global" if donorname=="FPE Global Group"

replace donorname="F W S Carter Ltd" if donorname=="FWS Carter & Sons Ltd"

replace donorname="Fidelity Investment Management" if donorname=="Fidelity Investment Management Ltd"
replace donorname="FIL" if donorname=="Fidelity Investment Management"

replace donorname="Firoka (Heythrop Park) Ltd" if donorname=="Firoka (Heytrop Park)"
replace donorname="Firoka (Heythrop Park) Ltd" if donorname=="Firoka (Kings Cross) Ltd"

replace donorname="Flamingo Land Ltd" if donorname=="Flamingo Land Resort Ltd"

replace donorname="Frederick Fortsyth" if donorname=="Frederick M Forsyth"

replace donorname="Fulham Investment & Property Co." if donorname=="Fulham Investment & Property Company Ltd"
replace donorname="Fulham Investment & Property Co." if donorname=="Fulham Investment and Property Co"
replace donorname="Fulham Investment & Property Co." if donorname=="Fulham Investment and Property Company Ltd"

* Harrow West
replace donorname="General Insurance Brokers UK Ltd" if donorname=="General Insurance Brookers (UK) Plc"

* Central Party
replace donorname="George E Robinson" if donorname=="George ES Robinson"

replace donorname="George J P D Townshend" if donorname=="George JPD Townshend"

* Winchester
replace donorname="George M Hollingbery" if donorname=="George M Hollingbury"

replace donorname="Grange ( Birkenhead) Property Co. Ltd" if donorname=="Grange (Birkenhead) Property Co Ltd"
replace donorname="Grange ( Birkenhead) Property Co. Ltd" if donorname=="Grange (Birkenhead) Property Co. Ltd"
replace donorname="Grange ( Birkenhead) Property Co. Ltd" if donorname=="Grange (Birkenhead) Property Co.Ltd"
replace donorname="Grange ( Birkenhead) Property Co. Ltd" if donorname=="Grange (Birkenhead) Property Company Ltd"
replace donorname="Grange ( Birkenhead) Property Co. Ltd" if donorname=="Grange (Birkenhead) Property Group"
replace donorname="Grange ( Birkenhead) Property Co. Ltd" if donorname=="Grange (Birkenhead) Property Ltd"
replace donorname="Grange ( Birkenhead) Property Co. Ltd" if donorname=="Grange(Birkenhead) Property Co. Ltd"

replace donorname="Green Network Plc" if donorname=="Green Network UK Plc"

replace donorname="HBC Group" if donorname=="HBC Group Ltd"

replace donorname="Hall Hunter Partnership Ltd" if donorname=="Hall Hunter Partnership (FARMING) Ltd"

replace donorname="Hanover Communications International Ltd" if donorname=="Hanover Communication International Ltd"

replace donorname="Hartley Property Trust Ltd" if donorname=="Hartley Propoerty Trust Ltd"

replace donorname="Henfield Lodge Aviation" if donorname=="Henfield Lodge Aviation Ltd"

replace donorname="Hi-Tec Finishers (Holdings) Ltd" if donorname=="Hi-Tec Finishers Ltd"
replace donorname="Hi-Tec Finishers (Holdings) Ltd" if donorname=="Hi-Tech Finishers Ltd"

* Castle Point
replace donorname="Holding & Barnes Plc" if donorname=="Holding & Barnes (CI) Ltd"

replace donorname="Holiday Autos Group Ltd" if donorname=="Holiday Autos International Ltd"

replace donorname="Huawei Technologies (UK) Co Ltd" if donorname=="Huawei Technologies (UK) Co. Ltd"

replace donorname="IM Properties Plc" if donorname=="IM Properties (Coleshill) Ltd"

replace donorname="IPGL Ltd" if donorname=="IPGL Ltd City Index"

replace donorname="Industrial Chemicals Ltd" if donorname=="Industrial Chemichals Ltd"

replace donorname="InterMarine Offshore Services" if donorname=="InterMarine Offshore Services Ltd"

replace donorname="JC Bamford Excavators Ltd" if donorname=="J. C Bamford Excavators Ltd"
replace donorname="JC Bamford Excavators Ltd" if donorname=="JCB Ltd"
replace donorname="JC Bamford Excavators Ltd" if donorname=="JCB Resarch"
replace donorname="JC Bamford Excavators Ltd" if donorname=="JCB Research"
replace donorname="JC Bamford Excavators Ltd" if donorname=="JCB Research Ltd"
replace donorname="JC Bamford Excavators Ltd" if donorname=="JCB Sales Ltd"
replace donorname="JC Bamford Excavators Ltd" if donorname=="JCB World Brands Ltd"
replace donorname="JC Bamford Excavators Ltd" if donorname=="Bamford Industries Ltd"

replace donorname="Jersey (Developments) Ltd" if donorname=="Jersey House (Developments) Ltd"
replace donorname="Jersey (Developments) Ltd" if donorname=="Jersey House Developments Ltd"

replace donorname="John Clark (Holdings) Ltd" if donorname=="John Clark Holdings Ltd"

replace donorname="Johnsey Estates 1990 Ltd" if donorname=="Johnsey Estates (1990) Ltd"

* KPMG both company and LLP, going to merge them
replace donorname="KPMG" if donorname=="KPMG LLP"
replace donorname="KPMG" if donorname=="KPMG UK Ltd"

replace donorname="Katsouris Bros Ltd" if donorname=="Katsouris Brothers Ltd"

replace donorname="Kerr Mcgee Oil UK Plc" if donorname=="Kerr-McGee North Sea UK Ltd"

replace donorname="Killik & Co" if donorname=="Killik & Co LLP"
replace donorname="Killik & Co" if donorname=="Killik and Co LLP"

replace donorname="Lady Mary Fuller" if donorname=="Lady Mary K Fuller"

replace donorname="Landcap Ltd" if donorname=="Landcap Development Eversley Ltd"

replace donorname="Leon Schaller" if donorname=="Leon Schaller OBE"

replace donorname="Leonard Steinberg" if donorname=="Leonard Lord Steinberg"
replace donorname="Leonard Steinberg" if donorname=="Lord Leonard Steinberg"

replace donorname="Jamie Borwick" if donorname=="Lord Geoffrey (Jamie) Borwick"
replace donorname="Jamie Borwick" if donorname=="Lord Jamie Borwick"

replace donorname="Lord John Sainsbury" if donorname=="Lord John D Sainsbury"
replace donorname="Lord John Sainsbury" if donorname=="Lord John Sainsbury of Preston Candover"
replace donorname="Lord John Sainsbury" if donorname=="Lord Sainsbury of Preston Candover"

replace donorname="Lord Michael A Ashcroft" if donorname=="Lord Michael Anthony Ashcroft"
replace donorname="Lord Michael A Ashcroft" if donorname=="Lord na Ashcroft"

replace donorname="Lord Philip C Harris" if donorname=="Lord Philip Harris"
replace donorname="Lord Philip C Harris" if donorname=="Lord Philip Harris of Peckham"
replace donorname="Lord Philip C Harris" if donorname=="Lord Phillip Harris of Peckham"

replace donorname="Lord Ralph Clitheroe" if donorname=="Lord R Clitheroe"

replace donorname="Lord Alexander Hesketh" if donorname=="Lord na Hesketh"

replace donorname="Lord Alexander Hesketh" if donorname=="Lord na Hesketh"

replace donorname="Lord Graham Kirkham" if donorname=="Lord na Kirkham"

replace donorname="Lord Nicholas W Bethell" if donorname=="Lord na Bell"

replace donorname="Lowe & Fletcher Ltd" if donorname=="Lowe and Fletcher Ltd"

replace donorname="Lucy Cady" if donorname=="Lucy C Cady"

replace donorname="MCR Property Group" if donorname=="MCR Property Group Ltd"

replace donorname="MSG Commercial" if donorname=="MSG Commercial Ltd"

replace donorname="Maritime Orient & Near East Agency Ltd" if donorname=="Maritime Orient & Neareast Agency Ltd"
replace donorname="Maritime Orient & Near East Agency Ltd" if donorname=="Maritime Orient & Nearest Agency Ltd"

replace donorname="Martin-Baker Aircraft Co Ltd" if donorname=="Martin-Baker Aircraft Company Ltd"

replace donorname="Maxwell C B Ward" if donorname=="Maxwell C Ward"

replace donorname="Michael J Holingbery" if donorname=="Michael J Hollingberry"
replace donorname="Michael J Holingbery" if donorname=="Michael J Hollingbery"

replace donorname="Midland Food Group" if donorname=="Midland Food Group Ltd"

replace donorname="Midland Software Ltd" if donorname=="Midland Software Holdings Ltd"

replace donorname="Mohammed B Quadir" if donorname=="Mohammed B Qadir"

replace donorname="Motcomb Estates Ltd" if donorname=="Motcomb Estates Ltd - Originally reported: Unicorn Admin Ltd"

replace donorname="Moundsley Hall Nursing Home" if donorname=="Moundsley Hall Nursing Home Ltd"

* Kilpurn
replace donorname="Natalie Chester" if donorname=="Natalie L Chester"

* Nottingham South
replace donorname="Neville A Baxter" if donorname=="Neville Baxter"

* Nottingham South
replace donorname="Neville B Bosworth" if donorname=="Neville Bosworth"

* SW Surrey
replace donorname="Nicolas J Roach" if donorname=="Nicolas Roach"

replace donorname="Nigel C Bassard" if donorname=="Nigel C Brassard"

replace donorname="Nigel Lindsay-Fynn" if donorname=="Nigel Linday-Fynn"

replace donorname="Nike Land Securities Ltd" if donorname=="Nikeland Securities Ltd"

replace donorname="Norbrook Laboratories" if donorname=="Norbrook Laboratories (GB Ltd)"
replace donorname="Norbrook Laboratories" if donorname=="Norbrook Laboratories GB Ltd"
replace donorname="Norbrook Laboratories" if donorname=="Norbrook Laboratories Ltd"

replace donorname="Norman Freed" if donorname=="Norman Freerd"

replace donorname="Northumbria Water Ltd" if donorname=="Northumbrian Water Ltd"

replace donorname="Oceanic Jewellers Ltd" if donorname=="Oceanic Jewellers"

replace donorname="PACKT PUBLISHING LIMITED" if donorname=="PACKT Publishing Ltd"
replace donorname="PACKT PUBLISHING LIMITED" if donorname=="Packt Publishing Ltd"

replace donorname="Palmer Capital Partners" if donorname=="Palmer Capital LLP"
replace donorname="Palmer Capital Partners" if donorname=="Palmer Capital Partners Ltd"

*Elmet and Rothwell
replace donorname="Park Lane Homes Ltd" if donorname=="Park Lane Properties (Leeds) Ltd"

*Altrincham & Sale West
replace donorname="Patrick Kennedy" if donorname=="Patrick J Kennedy"

replace donorname="Pertemps Investments Ltd" if donorname=="Pertemps Investment Ltd"

replace donorname="Philip Wilson (Grain) Ltd" if donorname=="Phillip Wilson ( Grain) Ltd"

replace donorname="Piccadilly Greetings Group Ltd" if donorname=="Picadilly Greetings Group Ltd"

replace donorname="Pogson and Davies" if donorname=="Pogson and Davis"

replace donorname="PricewaterhouseCoopers LLP" if donorname=="PricewaterCoopers LLP"

*Wealden
replace donorname="Prudence Watts" if donorname=="Prudence M Watts"

replace donorname="Quentin GC Portsmouth" if donorname=="Quentin G.C. Portsmouth"
replace donorname="Quentin GC Portsmouth" if donorname=="Quentin Earl of Portsmouth"

replace donorname="Rainham Steel Co Ltd" if donorname=="Rainham Steel Company Ltd"

*Berwick-upon-Tweed
replace donorname="Ralph Northumberland" if donorname=="Ralph G Northumberland"

replace donorname="Ramez Sousou" if donorname=="Ramez F Sousou"

replace donorname="Ranbir Suri" if donorname=="Ranbir S Suri"

replace donorname="Ransom's Dock Ltd" if donorname=="Ransome's Dock Ltd"

replace donorname="Red Fig Group Ltd" if donorname=="Red Fig Ltd"

replace donorname="Reel Cinemas Ltd" if donorname=="Reel Cinemas (UK) Ltd"

replace donorname="Rich Investments Ltd" if donorname=="Rich Investements Ltd"

*Broxtowe
replace donorname="Richard C N  Davidson" if donorname=="Richard C N Davidson"

replace donorname="Robert N Edmiston" if donorname=="Robert N Edminston"

replace donorname="Richard Sutton Estates Ltd" if donorname=="Richard Sutton Ltd"
replace donorname="Richard Sutton Estates Ltd" if donorname=="Richard Sutton's Settled Estates"
replace donorname="Richard Sutton Estates Ltd" if donorname=="Richard Sutton's Settled Estates Ltd"

replace donorname="Rocco Forte" if donorname=="Rocco Forte Ltd"

replace donorname="Roy L Peires" if donorname=="Roy L  Peires"
replace donorname="Roy L Peires" if donorname=="Roy Peires"

replace donorname="Saintly Hird & Partners Ltd" if donorname=="Saintly Hird and Partners Ltd"
replace donorname="Saintly Hird & Partners Ltd" if donorname=="Sainty Hird & Partners Ltd"

replace donorname="Sarbjit Singh Jhooty" if donorname=="Sarbjit S Jhooty"

replace donorname="Selfridges Ltd" if donorname=="Selfridges Retail Ltd"

replace donorname="Sheena Evershed" if donorname=="Sheena A Evershed"

replace donorname="Shore Capital Group Plc" if donorname=="Shore Capital Ltd"
replace donorname="Shore Capital Group Plc" if donorname=="Shore Capital Stockbrokers Ltd"

* The Cotswolds
replace donorname="Simon Keswick" if donorname=="Simon L Keswick"

replace donorname="Simon R M Baynes" if donorname=="Simon RM Baynes"

replace donorname="Slough Estates Plc" if donorname=="Slough Estates Finance Ltd"
replace donorname="Slough Estates Plc" if donorname=="Slough Estates Finance Plc"

replace donorname="South Fulham Constitutional Club" if donorname=="South Fulham Constitutional Club Company Ltd"

replace donorname="Stalbury Trustees" if donorname=="Stalbury Trusteees"

replace donorname="Stanley Kalms" if donorname=="Stanley Lord Kalms"

* Hove
replace donorname="Stewart Newton" if donorname=="Stewart W Newton"

replace donorname="Stringfellow Restaurants Ltd" if donorname=="Stringfellows Restaurants Ltd"

replace donorname="Stuart Le Gassick" if donorname=="Stuart LeGassick"

replace donorname="Tamares Real Estate Investments (UK) Ltd" if donorname=="Tamares Real Estate Investments UK Ltd"

replace donorname="Tattersall Ltd" if donorname=="Tattersalls Ltd"

replace donorname="Theo Paphitis" if donorname=="Theodoros Paphitis"

replace donorname="Thomas FT Harrison" if donorname=="Thomas F T Harrison"

replace donorname="Timothy M B Rice" if donorname=="Timothy M.B. Rice"

* Cities of London and Westminster
replace donorname="Timothy Sanderson" if donorname=="Timothy W Sanderson"

replace donorname="Tobias Ellwood" if donorname=="Tobias M Ellwood"

replace donorname="Torex Plc" if donorname=="Torex Retail Plc"
replace donorname="Torex Plc" if donorname=="Torex Retail plc"

replace donorname="Tratos Ltd" if donorname=="Tratos (UK) Ltd"

replace donorname="Ulric  D Barnett" if donorname=="Ulric D Barnett"

replace donorname="Ultimate Succession LLP" if donorname=="Ultimate Sucession Planning Ltd"

replace donorname="Unex Construction Ltd" if donorname=="Unex Group"
replace donorname="Unex Construction Ltd" if donorname=="Unex Ltd"

replace donorname="Westfield Europe Ltd" if donorname=="Westfield Shopping Towns Ltd"
replace donorname="Westfield Europe Ltd" if donorname=="Westfield Shoppingtowns Ltd"

* Somerton
replace donorname="Will Hobhouse" if donorname=="William A Hobhouse"

replace donorname="William Cook Holdings Ltd" if donorname=="William Cook Ltd"

replace donorname="William Lamb Footwear Ltd" if donorname=="William Lamb (Holdings) Ltd"

*Brentford & Isleworth
replace donorname="William H Salomon" if donorname=="William Salomon"

replace donorname="Windsor Services Ltd" if donorname=="Windsor Service Ltd"

replace donorname="Younger Homes (Northern) Ltd" if donorname=="Younger Homes ( Northern) Ltd"

* Richmond Park
replace donorname="Zac Goldsmith" if donorname=="Zac F Goldsmith"
replace donorname="Zac Goldsmith" if donorname=="Zacharias F Goldsmith"
replace donorname="Zac Goldsmith" if donorname=="Zacharias Goldsmith"

* Generate measures of donation
encode donorname, gen (donorid2)
gen recdate=date(receiveddate, "DMY")
replace recdate=date(accepteddate, "DMY") if receiveddate==""
gen monthly=mofd(recdate)
gen year=yofd(recdate)

gen oppo=1 if recdate<18388
replace oppo=0 if oppo==.
gen prebrexit=1 if recdate>18387 & recdate<20628
replace prebrexit=0 if prebrexit==.
gen brexit=1 if recdate>20627
replace brexit=0 if brexit==.


gen con_company=con_value if donorstatus=="Company"
gen con_friendly=con_value if donorstatus=="Friendly Society"
gen con_impermissible=con_value if donorstatus=="Impermissible Donor"
gen con_individ=con_value if donorstatus=="Individual"
gen con_limited=con_value if donorstatus=="Limited Liability Partnership"
gen con_other=con_value if donorstatus=="Other"
gen con_public=con_value if donorstatus=="Public Fund"
gen con_trust=con_value if donorstatus=="Trust"
gen con_unidentifiable=con_value if donorstatus=="Unidentifiable Donor"
gen con_unincorporated=con_value if donorstatus=="Unincorporated Association"
gen con_biz=con_value if donorstatus=="Company" | donorstatus=="Limited Liability Partnership"
gen con_priv=con_value if con_value!=. & donorstatus!="Public Fund"
gen con_all_other=con_value if donorstatus=="Friendly Society" | donorstatus=="Impermissible Donor" | donorstatus=="Other" | donorstatus=="Trust" | donorstatus=="Unidentifiable Donor" | donorstatus=="Unincorporated Association"



* These achieve consistency over time
*gen con_biz_b=con_value if donorstatus=="Company" & con_value>7499 | donorstatus=="Limited Liability Partnership" & con_value>7499

*gen con_individ_b=con_value if donorstatus=="Individual" & con_value>7499 

*gen con_all_other_b=con_value if donorstatus=="Friendly Society" & con_value>7499 | donorstatus=="Impermissible Donor" & con_value>7499 | donorstatus=="Other" & con_value>7499 | donorstatus=="Trust" & con_value>7499  | donorstatus=="Unidentifiable Donor" & con_value>7499 | donorstatus=="Unincorporated Association" & con_value>7499 

* Here's a version that studies all donations, but pre and post 2010 * aren't strictly comparable

gen con_biz_b=con_value if donorstatus=="Company" | donorstatus=="Limited Liability Partnership" 

gen con_individ_b=con_value if donorstatus=="Individual" 

gen con_all_other_b=con_value if donorstatus=="Friendly Society"  | donorstatus=="Impermissible Donor"  | donorstatus=="Other" | donorstatus=="Trust"  | donorstatus=="Unidentifiable Donor"  | donorstatus=="Unincorporated Association" 

* Have only used first two digits from http://resources.companieshouse.gov.uk/sic/ for many I had to look up

*1900 club?
gen uksic=68201  if donorname=="33 Group Ltd"
replace uksic=43390  if donorname=="3R Construction Development Ltd"
replace uksic=46190  if donorname=="3V International Ltd"
replace uksic=68209  if donorname=="A & H Developers Ltd"
replace uksic=92000  if donorname=="A & S Leisure Group Ltd"
replace uksic=01630 if donorname=="A B Produce Plc"
replace uksic=70229  if donorname=="A C G Management Ltd"
replace uksic=.  if donorname=="A Day In Country Ltd"
* above seems to be involved in "corporate entertaintment"
replace uksic=93290  if donorname=="A Day In Country Ltd"
replace uksic=47710 if donorname=="A. Levy & Son Ltd"
replace uksic=96090 if donorname=="AAP Architecture Ltd"
replace uksic=70100 if donorname=="ABM Holdings Ltd"
replace uksic=01240 if donorname=="AC Goatham & Son"
replace uksic=68209 if donorname=="AC Properties (Acton) Ltd"
replace uksic=47990 if donorname=="AGCP Ltd"
replace uksic=46140 if donorname=="AGD Equipment"
replace uksic=. if donorname=="AHV Associates LLP"
* above provides investment banking services to privately owned businesses
replace uksic=66000 if donorname=="AHV Associates LLP"
replace uksic=78109 if donorname=="ARQ International"
replace uksic=47190 if donorname=="ASDA Stores Ltd"
replace uksic=15120 if donorname=="ASHS Ltd"
* took first code mentioned for above
replace uksic=56103 if donorname=="AXA Trading Ltd"
replace uksic=51102 if donorname=="AYR Group Ltd"
* took first code mentioned for above
replace uksic=98000 if donorname=="Abbey Business Centres Ltd"
replace uksic=41201 if donorname=="Abbey Manor Group"
* took first code mentioned for above
replace uksic=85200 if donorname=="Abercorn School Ltd"
replace uksic=79120 if donorname=="Abercrombie & Kent Ltd"
replace uksic=74909 if donorname=="Access Industries (UK) Ltd"
replace uksic=49320 if donorname=="Addison Lee Plc"
* took first code mentioned for above
replace uksic=20301 if donorname=="Adshead Ratcliffe & Co Ltd"
replace uksic=86900 if donorname=="Advinia Health Care Ltd"
replace uksic=32990 if donorname=="Afia Ltd"
replace uksic=08110 if donorname=="Aggregate Industries UK Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Air Foyle Ltd"
* above is air freight
replace uksic=51210 if donorname=="Air Foyle Ltd"
replace uksic=70100 if donorname=="Airbus Group Ltd"
replace uksic=4533 if donorname=="Airedale Mechanical and Electrical Ltd"
* took first code mentioned for above
replace uksic=68320 if donorname=="Airlink Asset Management Ltd"
replace uksic=43290 if donorname=="Airlink Group"
replace uksic=. if donorname=="Airport Park and Ride Ltd"
* Above is coded as "dormant"
replace uksic=82990 if donorname=="Akehurst Property Ltd"
replace uksic=58142 if donorname=="Alain Charles Publishing Ltd"
replace uksic=56302 if donorname=="Alamax Ltd"
replace uksic=49410 if donorname=="Alan Firmin Ltd"
* took first code mentioned for above
replace uksic=49410 if donorname=="Alan Firmin Ltd"
replace uksic=68209 if donorname=="Albert Buildings Ltd"
replace uksic=82990 if donorname=="Albion Agencies Ltd"
replace uksic=68100 if donorname=="Alchemist Estates Ltd"
replace uksic=46110 if donorname=="Alexander Inglis & Son Ltd"
replace uksic=74909 if donorname=="Alexandra House Care Services Ltd"
replace uksic=46900 if donorname=="Alfred Dunhill Ltd"
* took first code mentioned for above
replace uksic=14132 if donorname=="Alisa Retail Ltd"
* took first code mentioned for above
replace uksic=70100 if donorname=="Allamhouse Ltd"
replace uksic=68209 if donorname=="Allied Commercial Exporters Ltd"
replace uksic=01130 if donorname=="Allpress Farms Ltd"
replace uksic=68209 if donorname=="Alphalarch Ltd"
replace uksic=7487 if donorname=="Altitude Broadcasting and Corporate Studios Ltd"
replace uksic=68100 if donorname=="Amek Investments Ltd"
replace uksic=82990 if donorname=="Amey Group Services Ltd"
* took first code mentioned for above
replace uksic=02400 if donorname=="Amos Nelson Ltd"
replace uksic=7011 if donorname=="Ancaster Properties Ltd"
replace uksic=41100 if donorname=="Anderson Construction Ltd"
replace uksic=70100 if donorname=="Anderson Group"
replace uksic=68209 if donorname=="Anderson Group Properties Ltd"
replace uksic=70100 if donorname=="Anderson Group Services Ltd"
replace uksic=. if donorname=="Angelsource Ltd"
replace uksic=68209 if donorname=="Anglia City Developments Ltd"
replace uksic=70100 if donorname=="Anglia Countrywide Development Ltd"
* previous name of above included "construction"
replace uksic=79110 if donorname=="Anglo Chinese Executive Travel Ltd"
replace uksic=41100 if donorname=="Anglo Scottish Properties Ltd"
replace uksic=79110 if donorname=="Anglo Chinese Executive Travel Ltd"
replace uksic=79110 if donorname=="Annabel's (Berkeley Square) Ltd"
replace uksic=79110 if donorname=="Anne Street Partners Ltd"
* above appears to be financial services
replace uksic=55100 if donorname=="Apex Hotels Ltd"
replace uksic=77110 if donorname=="Apollo Marquees Ltd"
replace uksic=82990 if donorname=="Apple Consultants Ltd"
replace uksic=56102 if donorname=="Appt Corporation Ltd"
replace uksic=70229 if donorname=="Appt Management Services Ltd"
replace uksic=43290 if donorname=="Aquind Ltd"
replace uksic=64999 if donorname=="Arbuthnot Banking Group Plc"
replace uksic=68209 if donorname=="Area Properties"
replace uksic=41100 if donorname=="Aria Properties"
replace uksic=. if donorname=="Arlon Stationary (Printers) Ltd"
* above is printing
replace uksic=18129 if donorname=="Arlon Stationary (Printers) Ltd"
replace uksic=70100 if donorname=="Armajaro Holdings Ltd"
replace uksic=45111 if donorname=="Arnold Clark Automobiles Ltd"
* took first code mentioned for above
replace uksic=45111 if donorname=="Arnold Clark Automobiles Ltd"
replace uksic=41100 if donorname=="Arnold Estates Ltd"
replace uksic=70229 if donorname=="Arora Management Services Ltd"
replace uksic=90330 if donorname=="Artbar Ltd"
replace uksic=25710 if donorname=="Arthur Price & Co Ltd"
replace uksic=53202 if donorname=="Artic Media Ltd"
replace uksic=70100 if donorname=="Artisan UK Plc"
replace uksic=. if donorname=="Asda Property Holdings Plc"
replace uksic=68209 if donorname=="Ashall Plc"
replace uksic=68100 if donorname=="Ashcorn Estates Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Ashley Group Ltd"
* now dormant, was construction
replace uksic=41000 if donorname=="Ashley Group Ltd"
replace uksic=85590 if donorname=="Ashport Ltd"
replace uksic=70100 if donorname=="Aspers Management Services Ltd"
replace uksic=92000 if donorname=="Aspinalls Club Ltd"
replace uksic=68209 if donorname=="Assetgrove Lettings Ltd"
replace uksic=68310 if donorname=="Assetz for Investors Ltd"
replace uksic=82990 if donorname=="Associated Technologies Ltd"
* Association of Conservative Clubs
* Association of Conservative Clubs Ltd (The)
replace uksic=68100 if donorname=="Astimwood Properties Ltd"
replace uksic=73110 if donorname=="Attinger Jack Advertising Ltd"
replace uksic=46320 if donorname=="Aubrery Allen Ltd"
replace uksic=64209 if donorname=="Auckland Shipping Ltd"
replace uksic=62020 if donorname=="Author Services Technical Ltd"
* took first code mentioned for above
replace uksic=70229 if donorname=="Avant Guardians Ltd"
replace uksic=61300 if donorname=="Avanti Communications Ltd"
replace uksic=61300 if donorname=="Avanti Communications Ltd"
replace uksic=51102 if donorname=="Ayr Group Ltd"
* took first code mentioned for above
replace uksic=32990 if donorname=="B S Eaton Ltd"
replace uksic=41100 if donorname=="B&S Property Ltd"
replace uksic=41201 if donorname=="B. & E Boys Ltd"
* took first code mentioned for above
replace uksic=43341 if donorname=="B.D.S. Contracts (Milford Haven) Ltd"
* took first code mentioned for above
replace uksic=25610 if donorname=="B.E. Wedge Holdings Ltd"
replace uksic=25610 if donorname=="B.E. Wedge Holdings Ltd"
replace uksic=51101 if donorname=="BAA Airports Ltd"
replace uksic=81100 if donorname=="BAA Business Support Centre Ltd"
replace uksic=64999 if donorname=="BGC Brokers GP Ltd"
replace uksic=68209 if donorname=="BHE Ltd"
replace uksic=70100 if donorname=="BPP Holdings Plc"
replace uksic=64929 if donorname=="BSN Capital Partners Ltd"
replace uksic=46900 if donorname=="Babyway International Ltd"
replace uksic=. if donorname=="Back Bedroom Operations No 2"
replace uksic=74990 if donorname=="Backup Technology Ltd"
replace uksic=70229 if donorname=="Bain & Co Holdings Ltd"
replace uksic=22290 if donorname=="Balmoral Comtec Ltd"
replace uksic=64202 if donorname=="Balmoral Group Holdings Ltd"
replace uksic=96090 if donorname=="Banana Split Plc"
replace uksic=55100 if donorname=="Banbury House Hotel"
replace uksic=56103 if donorname=="Bannsols Beta Ltd"
replace uksic=56103 if donorname=="Bannsols Beta Ltd"
replace uksic=68100 if donorname=="Barberry Group Ltd"
replace uksic=27900 if donorname=="Barnbrook Systems Ltd"
replace uksic=41100 if donorname=="Barnford Industries Ltd"
* took first code mentioned for above
replace uksic=46342 if donorname=="Barrel Booze Ltd"
replace uksic=41202 if donorname=="Barry Howard Homes Ltd"
replace uksic=. if donorname=="Basic Style Ltd"
replace uksic=68209 if donorname=="Bayford & Co Ltd"
replace uksic=41100 if donorname=="Beachley Property Ltd"
replace uksic=. if donorname=="Bearwood Corporate Services Ltd"
* Above is a merger and acquisitions broker.  See Telegraph article.
replace uksic=66000 if donorname=="Bearwood Corporate Services Ltd"
replace uksic=46900 if donorname=="Beams Internaional Ltd"
replace uksic=41100 if donorname=="Becksford Gate Ltd"
replace uksic=55202 if donorname=="Beds and Bars Ltd"
* took first code mentioned for above
* Bedworth Conservative Club
* Beech Hill Conservative Club Building Ltd
replace uksic=68209 if donorname=="Beech Hill Residential Investments Ltd"
replace uksic=68100 if donorname=="Beeson Investments Ltd"
* took first code mentioned for above
replace uksic=41100 if donorname=="Beeson & Sons Ltd"
* took first code mentioned for above
replace uksic=51101 if donorname=="Belfast International Airport Ltd"
* took first code mentioned for above
replace uksic=70210 if donorname=="Bell Pottinger"
replace uksic=. if donorname=="Benson Box Holdings Ltd"
* Packaging
replace uksic=82920 if donorname=="Benson Box Holdings Ltd"
replace uksic=96090 if donorname=="Bentleys Entertainments Ltd"
replace uksic=66220 if donorname=="Berkeley Burke"
replace uksic=68100 if donorname=="Berkshire Properties Ltd"
replace uksic=56210 if donorname=="Bertie's Catering Company Ltd"
replace uksic=23610 if donorname=="Besblock Ltd"
replace uksic=79110 if donorname=="Best at Travel Plc"
replace uksic=46390 if donorname=="Bestway"
replace uksic=92000 if donorname=="Betfair Ltd"
replace uksic=25500 if donorname=="Bifrangi UK Ltd"
replace uksic=08110 if donorname=="Birchover Stone Ltd"
replace uksic=56210 if donorname=="Birley's Ltd"
replace uksic=51101 if donorname=="Birmingham Airport Ltd"
replace uksic=08990 if donorname=="Bisichi Mining Plc"
* took first code mentioned for above
replace uksic=94120 if donorname=="Biznet UK"
replace uksic=. if donorname=="Blair Estate (Scotland) LLP"
* Holiday castle to rent above
replace uksic=55100 if donorname=="Blair Estate (Scotland) LLP"
replace uksic=70100 if donorname=="Bland Group Resources Ltd"
replace uksic=01110 if donorname=="Blankney Estates Ltd"
replace uksic=68209 if donorname=="Bleasdale Estates Ltd"
replace uksic=62012 if donorname=="Bloomberg Tradebook Ltd"
* took first code mentioned for above
replace uksic=41202 if donorname=="Bloor Homes Ltd"
replace uksic=82990 if donorname=="Bloxham Mill Ltd"
replace uksic=64304 if donorname=="Blue Skies Investments Ltd"
replace uksic=. if donorname=="Bluemantle Ltd"
* Buying and Selling of Own Real Estate
replace uksic=68100 if donorname=="Bluemantle Ltd"
replace uksic=21100 if donorname=="Boehringer Ingelheim Ltd"
replace uksic=68209 if donorname=="Bolderwood Property and Investme"
replace uksic=. if donorname=="Bolton Aerospace Ltd"
* Metal
replace uksic=25000 if donorname=="Bolton Aerospace Ltd"
replace uksic=43290 if donorname=="Bolts of Hereford Ltd"
replace uksic=96090 if donorname=="Bonhams 1793 Ltd"
replace uksic=47770 if donorname=="Boodle & Dunthorpe Ltd"
replace uksic=70229 if donorname=="Boston Consultancy Group Ltd"
replace uksic=51310 if donorname=="Boston Potato Company Ltd"
* Wholesale of Fruit and Vegetables
replace uksic=64209 if donorname=="Boultby Estates Ltd"
replace uksic=41201 if donorname=="Bowmer & Kirkland Ltd"
replace uksic=18129 if donorname=="Brand print (UK) Ltd"
replace uksic=18129 if donorname=="Braveshire Ltd"
replace uksic=82990 if donorname=="Brevan Howard Services Ltd"
replace uksic=41201 if donorname=="Brick Peers Ltd"
* took first code mentioned for above
replace uksic=41201 if donorname=="Bridge Contract Services Ltd"
replace uksic=68310 if donorname=="Bridges Estate Agents Ltd"
replace uksic=73110 if donorname=="Bright Spark Advertising Ltd"
replace uksic=68209 if donorname=="Brightfield Innovation Ltd"
replace uksic=. if donorname=="Brinkley Services Ltd"
* IT services
replace uksic=62020 if donorname=="Brinkley Services Ltd"
replace uksic=13931 if donorname=="Brintons Ltd"
replace uksic=46460 if donorname=="Bristol Laboratories Ltd"
replace uksic=64301 if donorname=="Britania Ltd"
replace uksic=68202 if donorname=="British Institute of Technology and E-Commerce Ltd"
* took first code mentioned for above
replace uksic=01500 if donorname=="Broadland Properties Ltd"
replace uksic=70229 if donorname=="Broker Profile Ltd"
replace uksic=08120 if donorname=="Bromfield Sand & Gravel Co Ltd"
replace uksic=41100 if donorname=="Brookstream Properties Ltd"
replace uksic=85200 if donorname=="Broomwood Hall School Ltd"
replace uksic=11010 if donorname=="Brothers Drinks Co Ltd"
* took first code mentioned for above
replace uksic=64201 if donorname=="Buccleuch Estates Ltd"
replace uksic=68100 if donorname=="Buckland Securities Ltd"
replace uksic=46480 if donorname=="Buckley Jewellery Ltd"
replace uksic=82990 if donorname=="Bullivant Media Ltd"
replace uksic=66220 if donorname=="Berkeley Burke"
replace uksic=82990 if donorname=="Burney Realty Ltd"
replace uksic=60100 if donorname=="Business Phones and Networks Ltd"
replace uksic=68100 if donorname=="BusyGlen Ltd"
* took first code mentioned for above
replace uksic=22290 if donorname=="Butterfield Signs Ltd"
replace uksic=68209 if donorname=="C & E Brokers Ltd"
replace uksic=41100 if donorname=="C L Eaglen and Co Ltd"
* took first code mentioned for above
replace uksic=71129 if donorname=="C2HM Hill Services Ltd"
replace uksic=33170 if donorname=="CAF Rail UK Ltd"
replace uksic=68209 if donorname=="CC Property Company Ltd"
replace uksic=64999 if donorname=="CDV-2 Ltd"
replace uksic=47990 if donorname=="CEND International Ltd"
replace uksic=. if donorname=="CENTRAX INDUSTRIES LIMITED"
* Gas Turbines and Power Generation
replace uksic=28110 if donorname=="CENTRAX INDUSTRIES LIMITED"
replace uksic=65120 if donorname=="CFN Insurance Services Ltd"
replace uksic=82920 if donorname=="CJK Packaging Ltd"
replace uksic=68209 if donorname=="CKL Properties Ltd"
replace uksic=73110 if donorname=="CMGRP UK Ltd"
replace uksic=. if donorname=="CMS Chemicals Ltd"
* Chemicals
replace uksic=20590 if donorname=="CMS Chemicals Ltd"
replace uksic=70229 if donorname=="CPM Consulting Ltd"
replace uksic=66190 if donorname=="CQS (UK) LLP"
replace uksic=74990 if donorname=="CSC IT Ltd"
replace uksic=26200 if donorname=="CTX Europe Ltd"
replace uksic=73200 if donorname=="CTF Partners Ltd"
replace uksic=70221 if donorname=="CVS Management Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Caddick Group Plc"
* Property Dev
replace uksic=68100 if donorname=="Caddick Group Plc"
replace uksic=35220 if donorname=="Cadent Gas Ltd"
replace uksic=06100 if donorname=="Cadogan Petroleum Plc"
replace uksic=64301 if donorname=="Caledonia Investments Plc"
replace uksic=66190 if donorname=="Call Connection Ltd"
* took first code mentioned for above
replace uksic=46719 if donorname=="Calor Gas Ltd"
replace uksic=66220 if donorname=="Camberford Law Plc"
replace uksic=82990 if donorname=="Camberton Associates Ltd"
replace uksic=82990 if donorname=="Campbell Rigg Design Ltd"
replace uksic=68100 if donorname=="Campden Hill Developments Ltd"
replace uksic=62090 if donorname=="Camvista.Com Ltd"
replace uksic=64999 if donorname=="Canaccord Adams Ltd"
replace uksic=41100 if donorname=="Canary Wharf Ltd"
replace uksic=. if donorname=="Candy & Candy Ltd"
* Interior Design
replace uksic=74100 if donorname=="Candy & Candy Ltd"
replace uksic=56101 if donorname=="Caprice Holdings Ltd"
replace uksic=62012 if donorname=="Care Monitoring 2000 Ltd"
replace uksic=56101 if donorname=="Caprice Holdings Ltd"
replace uksic=70229 if donorname=="Carl Pickford Advertising Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="Carling Associates Ltd"
* Carlton Club
* Carlton Club Political Committee
* Carlton Political Dinner
* Carlton Political Dinners
replace uksic=70221 if donorname=="Carlton Financial Group Ltd"
replace uksic=59113 if donorname=="Carlton Television Ltd"
replace uksic=41202 if donorname=="Carver Wolverhampton Ltd"
replace uksic=41100 if donorname=="Castle (2000) Property Development Ltd"
replace uksic=82990 if donorname=="Castle Rising Holdings Ltd"
replace uksic=87300 if donorname=="Castle Villas Ltd"
replace uksic=. if donorname=="Cavendish Corporate Finance Ltd"
* Sell side M&A
replace uksic=66000 if donorname=="Cavendish Corporate Finance Ltd"
replace uksic=64209 if donorname=="Cayzer Trust Company"
replace uksic=47990 if donorname=="Cend Ltd"
replace uksic=62020 if donorname=="Centerpoint Insurance Service Ltd"
* took first code mentioned for above
replace uksic=41201 if donorname=="Central Building Contractors (Glasgow) Ltd"
* took first code mentioned for above
replace uksic=27110 if donorname=="Centrax Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Chancel Liability Services Ltd"
* Insurance?
replace uksic=65120 if donorname=="Chancel Liability Services Ltd"
replace uksic=35110 if donorname=="Chandlers Country Properties Ltd"
replace uksic=43290 if donorname=="Chapman Ventilation Ltd"
* Chard Conservative Club Ltd
replace uksic=25990 if donorname=="Charles Blyth & Co Ltd"
replace uksic=82990 if donorname=="Charles Connell & Co Ltd"
replace uksic=73110 if donorname=="Charles Mason & Associates Ltd"
replace uksic=47190 if donorname=="Charlies Stores"
replace uksic=32990 if donorname=="Checkmate UK Ltd"
replace uksic=41100 if donorname=="Chester & County Unionist Buildings Ltd"
replace uksic=01430 if donorname=="Cheveley Park Stud Ltd"
replace uksic=. if donorname=="Chigwell (London) Ltd"
* Construction
replace uksic=41000 if donorname=="Chigwell (London) Ltd"
replace uksic=70200 if donorname=="Chiltern Care Holdings Ltd"
* took first code mentioned for above
replace uksic=56101 if donorname=="China Tang London Ltd"
replace uksic=35110 if donorname=="Chinook Urban Mining Ltd"
* took first code mentioned for above
replace uksic=41100 if donorname=="Choiceforce Ltd"
replace uksic=. if donorname=="Christofferson Robb & Co Ltd"
* Credit Fund Manager
replace uksic=66000 if donorname=="Christofferson Robb & Co Ltd"
replace uksic=. if donorname=="Christopher Moran & Co Ltd"
* Property Tycoon
replace uksic=68100 if donorname=="Christopher Moran & Co Ltd"
replace uksic=. if donorname=="Chrysalis Courses Ltd"
* Counselling training
replace uksic=85590 if donorname=="Chrysalis Courses Ltd"
replace uksic=68100 if donorname=="Churchill Retirement (Group) Ltd"
replace uksic=65110 if donorname=="Churchills International Consulting Ltd"
replace uksic=. if donorname=="Churchouse Financial Planning Ltd"
* Financial Planning
replace uksic=66000 if donorname=="Churchouse Financial Planning Ltd"
replace uksic=70229 if donorname=="Citadel Group Ltd"
replace uksic=82990 if donorname=="Citura Ltd"
replace uksic=41100 if donorname=="City and Provincial Properties Plc"
replace uksic=41100 if donorname=="City and West End Services Ltd"
replace uksic=62020 if donorname=="City Computing Ltd"
replace uksic=68310 if donorname=="City and West End Services Ltd"
replace uksic=96090 if donorname=="City Index Ltd"
replace uksic=68209 if donorname=="Citylink Group Ltd"
* Clacton Conservative Club Ltd
replace uksic=55110 if donorname=="Claridge's Hotel Ltd"
replace uksic=74990 if donorname=="Clarksteel Ltd"
replace uksic=55110 if donorname=="Classic Lodges Ltd"
replace uksic=87100 if donorname=="Clavering Care Ltd"
replace uksic=87100 if donorname=="Claygate Distribution Ltd"
replace uksic=45112 if donorname=="Claymore Motor Co Ltd"
replace uksic=. if donorname=="Clear & Lane Ltd"
* Financial Services
replace uksic=66000 if donorname=="Clear & Lane Ltd"
replace uksic=. if donorname=="Clearbrook Capital LLP"
* Private equity
replace uksic=66000 if donorname=="Clearbrook Capital LLP"
replace uksic=41100 if donorname=="Clearview Homes Ltd"
replace uksic=68209 if donorname=="Clerewell Ltd"
replace uksic=. if donorname=="Clerville Investment Management LLP"
* Financial Services
replace uksic=66000 if donorname=="Clerville Investment Management LLP"
replace uksic=82990 if donorname=="Clicknow Ltd"
replace uksic=47760 if donorname=="Clifton Nurseries Ltd"
replace uksic=22190 if donorname=="Clifton Rubber Company Ltd"
replace uksic=5248 if donorname=="Clinton Cards Plc"
replace uksic=79120 if donorname=="Clipper Ventures Plc"
replace uksic=96090 if donorname=="Clivedale Ventures Ltd"
replace uksic=68100 if donorname=="Clowes Developments (UK) Ltd"
replace uksic=55100 if donorname=="Club La Costa (UK) Plc"
replace uksic=11050 if donorname=="Cobra Beer Ltd"
replace uksic=62020 if donorname=="Coleman Bennett International Consultancy Plc"
replace uksic=68209 if donorname=="Coleman Investments Ltd"
replace uksic=68100 if donorname=="Coleridge Lodge Ltd"
replace uksic=41100 if donorname=="Colmore Trust Ltd"
* took first code mentioned for above
replace uksic=7487 if donorname=="Colourflow Production Ltd"
replace uksic=87300 if donorname=="Comfort Care Services UK Ltd"
replace uksic=68320 if donorname=="Commercial Estates Group"
replace uksic=62020 if donorname=="Communicator Corporation Ltd"
replace uksic=. if donorname=="Computational Mechanics International Ltd"
* Financial Services
replace uksic=66000 if donorname=="Computational Mechanics International Ltd"
replace uksic=62020 if donorname=="Computer Service Centre Ltd"
* took first code mentioned for above
replace uksic=61100 if donorname=="Comtec Cable Accessories Ltd"
replace uksic=82990 if donorname=="Concept Business Group Ltd"
replace uksic=68100 if donorname=="Conegate Ltd"
* took first code mentioned for above
replace uksic=55100 if donorname=="Connaught Hotel Ltd"
* Conservative Friends of Israel Ltd
replace uksic=55100 if donorname=="Conservative Properties (Wavertree) Ltd"
* Conservatives In Ltd
replace uksic=82990 if donorname=="Consolidated Contractors International Ltd"
replace uksic=78109 if donorname=="Contact Recruitment Ltd"
replace uksic=71129 if donorname=="Control Energy Costs Ltd"
replace uksic=. if donorname=="Corpacq Ltd"
* Financial Services
replace uksic=66000 if donorname=="Corpacq Ltd"
replace uksic=. if donorname=="Corpo Associates Ltd"
replace uksic=64999 if donorname=="Corporate Associates Ltd"
replace uksic=. if donorname=="Corporate Investments Ltd"
replace uksic=66000 if donorname=="Corporate Investments Ltd"
replace uksic=41100 if donorname=="Corran (Wakefield) Ltd"
replace uksic=82990 if donorname=="Country House Weddings Ltd"
replace uksic=68209 if donorname=="Countrywide Developments Ltd"
replace uksic=68100 if donorname=="Countywide Developments Ltd"
replace uksic=68100 if donorname=="Countywide Developments Ltd"
replace uksic=41100 if donorname=="Courtenay Investments Ltd"
replace uksic=68100 if donorname=="Couture Developments Ltd"
replace uksic=78200 if donorname=="Coyle Personnel Plc"
replace uksic=68100 if donorname=="Craven (Builders) Ltd"
replace uksic=74909 if donorname=="Crawford Healthcare Ltd"
replace uksic=66190 if donorname=="Creditforce Ltd"
replace uksic=68209 if donorname=="Crescent Properties (Hampstead)"
replace uksic=68209 if donorname=="Cringle Corporation Ltd"
replace uksic=82990 if donorname=="Criterion Asset Management Ltd"
replace uksic=70229 if donorname=="Criterion Capital Ltd"
replace uksic=47110 if donorname=="Crombie Concessions Ltd"
replace uksic=41202 if donorname=="Croudace"
replace uksic=47110 if donorname=="Crown Leisure Ltd"
replace uksic=46140 if donorname=="Crowson Fabrics Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="Cubitt Consulting Ltd"
replace uksic=68209 if donorname=="Currie Motors Ltd"
replace uksic=82990 if donorname=="Curtain Road Ltd"
replace uksic=. if donorname=="Cygnet Group Ltd"
* Engineering
replace uksic=71129 if donorname=="Cygnet Group Ltd"
replace uksic=41202 if donorname=="D & K Contracting Services Ltd"
replace uksic=41201 if donorname=="D & P Dixon Land & Properties Ltd"
replace uksic=93110 if donorname=="DC Leisure Management Ltd"
* took first code mentioned for above
replace uksic=68209 if donorname=="DCD Properties Ltd"
replace uksic=32990 if donorname=="DCS Europe Ltd"
* took first code mentioned for above
replace uksic=68209 if donorname=="DCT Developments Ltd"
replace uksic=68209 if donorname=="DE & DH Lever Commercial Property LLP"
* Property
replace uksic=. if donorname=="DFS Furniture Co Plc"
* Design, manufacture and Sale of furniture
replace uksic=31090 if donorname=="DFS Furniture Co Plc"
replace uksic=70229 if donorname=="DJP International Ltd"
replace uksic=69102 if donorname=="DLA Piper UK Ltd"
* Law
replace uksic=26110 if donorname=="DM Electronics Ltd"
replace uksic=41100 if donorname=="DPK Contractors Ltd"
replace uksic=43341 if donorname=="DW Contractors (Oxford) Ltd"
replace uksic=82990 if donorname=="Dahwood Finance Co Ltd"
replace uksic=11050 if donorname=="Daniel Thwaites Plc"
* took first code mentioned for above
replace uksic=. if donorname=="Darren Baker Fine Arts Ltd"
* Fine Art
replace uksic=47781 if donorname=="Darren Baker Fine Arts Ltd"
replace uksic=46900 if donorname=="Dann & Co (Display) Ltd"
replace uksic=41100 if donorname=="Datum Groundworks Ltd"
replace uksic=96090 if donorname=="David Ord Ltd"
replace uksic=82990 if donorname=="Davidson Training UK Ltd"
replace uksic=. if donorname=="Davis (Forest Field) Ltd"
* Property and Construction
replace uksic=68100 if donorname=="Davis (Forest Field) Ltd"
replace uksic=47290 if donorname=="Daylesford Organic Ltd"
replace uksic=46900 if donorname=="De Grisogono Ltd"
replace uksic=59120 if donorname=="De Lane Lea (Post Production) Ltd"
replace uksic=64205 if donorname=="De Putron Fund Management Ltd"
replace uksic=46330 if donorname=="Deans Food Group Ltd"
* Dairy
replace uksic=16290 if donorname=="Decorative Panels Components Ltd"
replace uksic=46330 if donorname=="Delamere Dairy Ltd"
replace uksic=70229 if donorname=="Delancey Real Estate Management Ltd"
replace uksic=70229 if donorname=="Deloitte LLP"
* Professional services
replace uksic=46342 if donorname=="Delta Drinks Ltd"
replace uksic=46342 if donorname=="Descent International Ltd"
* Holiday Properties
replace uksic=41100 if donorname=="Design & Construct (London) Ltd"
replace uksic=56301 if donorname=="Devine Restaurants Ltd"
replace uksic=46730 if donorname=="Dexam International Ltd"
replace uksic=46342 if donorname=="Dhamecha Foods Ltd"
replace uksic=55100 if donorname=="Dhillon Hotels Ltd"
replace uksic=70221 if donorname=="Dial House Consultants Ltd"
replace uksic=. if donorname=="Dial-a-Phone Ltd"
* Manufacturer of mobile phones
replace uksic=26301 if donorname=="Dial-a-Phone Ltd"
replace uksic=. if donorname=="Dickson Insurance Brokers Ltd"
* Insurance
replace uksic=65120 if donorname=="Dickson Insurance Brokers Ltd"
replace uksic=82990 if donorname=="Didgemere Consultants Ltd"
replace uksic=73120 if donorname=="Digivan Ltd"
replace uksic=96090 if donorname=="Dilman UK Ltd"
replace uksic=68209 if donorname=="Discovery Park Ltd"
replace uksic=41100 if donorname=="Dixon Prestige Homes Ltd"
* took first code mentioned for above
replace uksic=10910 if donorname=="Dodson & Horrell Ltd"
replace uksic=41100 if donorname=="Dolphin Head Group Holdings Plc"
replace uksic=51100 if donorname=="Dorchester Hotel Ltd"
replace uksic=64209 if donorname=="Dow Investments Plc"
replace uksic=68100 if donorname=="Drew Smith Homes Ltd"
replace uksic=64209 if donorname=="Drillgreat Ltd"
replace uksic=46520 if donorname=="Drones Ltd"
replace uksic=90030 if donorname=="Duck Productions Ltd"
replace uksic=90030 if donorname=="Dukehill Services Ltd"
* Property
replace uksic=68100 if donorname=="Dunalastair Estates"
replace uksic=68310 if donorname=="Duncan Phillips Ltd"
replace uksic=32990 if donorname=="Dunelm Optical Co. Ltd"
replace uksic=10130 if donorname=="Dunkleys Ltd"
replace uksic=. if donorname=="Durlacher Corporation Ltd"
replace uksic=70229 if donorname=="Durrington Corporation"
replace uksic=42120 if donorname=="Dyneema Ltd"
replace uksic=73200 if donorname=="E Feedback Research Ltd T/a Cognisant Research"
replace uksic=01110 if donorname=="E. Hobbs (Farms) Ltd"
* took first code mentioned for above
replace uksic=35110 if donorname=="E.On UK Plc"
* took first code mentioned for above
replace uksic=. if donorname=="ECJ Investments Ltd"
replace uksic=35110 if donorname=="EDF Energy Plc"
replace uksic=. if donorname=="EFP Capital LLP"
* Investment advice
replace uksic=66000 if donorname=="EFP Capital LLP"
replace uksic=74990 if donorname=="EIM (United Kingdom) Ltd"
replace uksic=73110 if donorname=="EIMS Ltd"
replace uksic=47110 if donorname=="ELBROOK (CASH & CARRY) LIMITED"
replace uksic=. if donorname=="ENG Ltd"
replace uksic=70229 if donorname=="EUK Consulting Ltd"
replace uksic=46190 if donorname=="Eaga Plc"
replace uksic=01110 if donorname=="Earl of Plymouth Estates Ltd"
replace uksic=08210 if donorname=="Earthline Ltd"
replace uksic=47990 if donorname=="Eastern Atlantic Helicopters Ltd"
replace uksic=. if donorname=="Ebullio Capital Management"
* Research and Investing
replace uksic=66000 if donorname=="Ebullio Capital Management"
replace uksic=38110 if donorname=="Eco Skip Hire Ltd"
replace uksic=64301 if donorname=="Ecofin Ltd"
replace uksic=68209 if donorname=="Eddisbury Property Co Ltd"
replace uksic=69202 if donorname=="Eden Financial Ltd"
replace uksic=96090 if donorname=="Edison School UK Ltd"
replace uksic=68209 if donorname=="Edmund G Thornhill"
replace uksic=74909 if donorname=="Edulink Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="Edwardian Group Ltd"
replace uksic=82990 if donorname=="Edwardian London Management Services Ltd"
replace uksic=70229 if donorname=="Eisvogel Ltd"
replace uksic=27900 if donorname=="Electrical Design and MFG CO Ltd"
replace uksic=70229 if donorname=="Elgin Partners Ltd"
replace uksic=21100 if donorname=="Eli Lilly & Co Ltd"
replace uksic=74990 if donorname=="Elizabeth Hindmarch Public Relations Ltd"
replace uksic=. if donorname=="Ellerman Investments Ltd"
* Property mgt
replace uksic=68100 if donorname=="Ellerman Investments Ltd"
replace uksic=69102 if donorname=="Ellisons Solicitors Ltd"
replace uksic=46990 if donorname=="Elmore Plant Services(1984) Ltd"
replace uksic=. if donorname=="Elstree Company"
replace uksic=70229 if donorname=="Emarel Services Ltd"
replace uksic=68100 if donorname=="Emerson Developments (Holdings) Ltd"
* took first code mentioned for above
replace uksic=46342 if donorname=="Eminent Wine Ltd"
replace uksic=5245 if donorname=="Empire Direct Ltd"
replace uksic=74901 if donorname=="Energy & Environment Business Services Ltd"
replace uksic=49200 if donorname=="English Welsh and Scottish Railways Ltd"
replace uksic=66300 if donorname=="Ennismore Fund Management Ltd"
replace uksic=98000 if donorname=="Ennismore Gardens"
replace uksic=82990 if donorname=="Ennismore International Management Ltd"
replace uksic=06100 if donorname=="Enquest Dons Ltd"
replace uksic=74990 if donorname=="Enstone Projects Ltd"
replace uksic=. if donorname=="Entertainment and Leisure Software Publishers Association Ltd"
replace uksic=96090 if donorname=="Entourage Concierge Ltd"
replace uksic=46510 if donorname=="Epson (UK) Ltd"
replace uksic=82990 if donorname=="Equity Partners Ltd"
replace uksic=32120 if donorname=="Eric N Smith Ltd"
replace uksic=94910 if donorname=="Erinastar Ltd"
replace uksic=. if donorname=="Ernst & Young LLP"
* Professional Services
replace uksic=41100 if donorname=="Esseff Furnishing Company Ltd (The)"
replace uksic=68209 if donorname=="Estates U.K. Ltd"
replace uksic=33160 if donorname=="Euravia Engineering and Supply Co Ltd"
replace uksic=46320 if donorname=="Euro Foods Group Ltd"
* took first code mentioned for above
replace uksic=47300 if donorname=="Euro Garages Ltd"
replace uksic=. if donorname=="Euro RSCG Apex Communications Ltd"
* Public Relations
replace uksic=46320 if donorname=="Eurofoods (UK) Ltd"
replace uksic=. if donorname=="Euronova Asset Management Ltd"
* Investment management
replace uksic=41100 if donorname=="European Land and Property Ltd"
replace uksic=65110 if donorname=="Evans Hart Ltd"
replace uksic=64910 if donorname=="Evans Randall Ltd"
replace uksic=85100 if donorname=="Eveline Day & Nursery Schools Ltd"
replace uksic=41201 if donorname=="Evenfold Ltd"
replace uksic=75000 if donorname=="Eville Jones Ltd"
replace uksic=68100 if donorname=="Excelsior Properties Ltd"
replace uksic=51100 if donorname=="Exclusive Hotels (London) Ltd"
replace uksic=35300 if donorname=="Excool Ltd"
replace uksic=68320 if donorname=="Exemplar Properties Ltd"
replace uksic=64999 if donorname=="Exotix Ltd"
replace uksic=58130 if donorname=="Express Newspapers Ltd"
replace uksic=58130 if donorname=="Express Newspapers Ltd"
replace uksic=87200 if donorname=="Extel Ltd"
replace uksic=87200 if donorname=="Exton Park Ltd"
* Country House
replace uksic=43330 if donorname=="Ezi Floor Ltd"
replace uksic=01500 if donorname=="F W S Carter Ltd"
* took first code mentioned for above
replace uksic=68209 if donorname=="F Williams (Bedford) Ltd"
replace uksic=68209 if donorname=="F. Vindis & Sons (Bedford) Ltd"
replace uksic=01110 if donorname=="F.W. Deptford (Over) Ltd"
replace uksic=. if donorname=="FC Fund Managers Ltd"
* Fund Managers
replace uksic=64999 if donorname=="FCT Europe Ltd"
replace uksic=62012 if donorname=="FIL"
replace uksic=41100 if donorname=="FK Facades Ltd"
* took first code mentioned for above
replace uksic=42110 if donorname=="FM Conway Ltd"
replace uksic=25110 if donorname=="FPE Global"
* took first code mentioned for above
replace uksic=10210 if donorname=="Faccenda Foods Ltd"
replace uksic=68320 if donorname=="Fairhome Asset Management Ltd"
replace uksic=64203 if donorname=="Fairview New Homes Ltd"
replace uksic=86101 if donorname=="Fairhome Care Group (W.L.) Ltd"
replace uksic=46380 if donorname=="Falfish Ltd"
replace uksic=10720 if donorname=="Farmhouse Biscuits Ltd"
replace uksic=68320 if donorname=="Fasset Ltd"
replace uksic=. if donorname=="Federal Aviation Ltd"
* ???
replace uksic=. if donorname=="Fenchurch Advisory Partners LLP"
* Financial Services
replace uksic=. if donorname=="Ferguson Seacabs Ltd"
* Materials, Conatiners and Packaging
replace uksic=49140 if donorname=="Fergusons Transport Ltd"
replace uksic=22290 if donorname=="Fibrelite Composites Ltd"
replace uksic=47790 if donorname=="Fielding & Nicholson Tailoring Ltd"
replace uksic=68320 if donorname=="Fifth Capital London Ltd"
replace uksic=68201 if donorname=="Filmgrain Ltd"
replace uksic=90030 if donorname=="Fine Art Commissions Ltd"
replace uksic=68209 if donorname=="Finemere Ltd"
replace uksic=69201 if donorname=="Finn-Kelcey & Chapman Ltd"
replace uksic=82990 if donorname=="Finsbury Ltd"

* Mohsen document begins here
replace uksic=. if donorname=="Ernst & Young LLP"
* Professional Services
replace uksic=6900 if donorname=="Ernst & Young LLP"
replace uksic=41100 if donorname=="Esseff Furnishing Company Ltd (The)"
replace uksic=68209 if donorname=="Estates U.K. Ltd"
replace uksic=33160 if donorname=="Euravia Engineering and Supply Co Ltd"
replace uksic=46320 if donorname=="Euro Foods Group Ltd"
* took first code mentioned for above
replace uksic=47300 if donorname=="Euro Garages Ltd"
replace uksic=. if donorname=="Euro RSCG Apex Communications Ltd"
* Public Relations
replace uksic=70000 if donorname=="Euro RSCG Apex Communications Ltd"
replace uksic=46320 if donorname=="Eurofoods (UK) Ltd"
replace uksic=. if donorname=="Euronova Asset Management Ltd"
* Investment management
replace uksic=66000 if donorname=="Euronova Asset Management Ltd"
replace uksic=41100 if donorname=="European Land and Property Ltd"
replace uksic=65110 if donorname=="Evans Hart Ltd"
replace uksic=64910 if donorname=="Evans Randall Ltd"
replace uksic=85100 if donorname=="Eveline Day & Nursery Schools Ltd"
replace uksic=41201 if donorname=="Evenfold Ltd"
replace uksic=75000 if donorname=="Eville Jones Ltd"
replace uksic=68100 if donorname=="Excelsior Properties Ltd"
replace uksic=51100 if donorname=="Exclusive Hotels (London) Ltd"
replace uksic=35300 if donorname=="Excool Ltd"
replace uksic=68320 if donorname=="Exemplar Properties Ltd"
replace uksic=64999 if donorname=="Exotix Ltd"
replace uksic=58130 if donorname=="Express Newspapers Ltd"
replace uksic=58130 if donorname=="Express Newspapers Ltd"
replace uksic=87200 if donorname=="Extel Ltd"
replace uksic=87200 if donorname=="Exton Park Ltd"
* Country House
replace uksic=55000 if donorname=="Exton Park Ltd"
replace uksic=43330 if donorname=="Ezi Floor Ltd"
replace uksic=01500 if donorname=="F W S Carter Ltd"
* took first code mentioned for above
replace uksic=68209 if donorname=="F Williams (Bedford) Ltd"
replace uksic=68209 if donorname=="F. Vindis & Sons (Bedford) Ltd"
replace uksic=01110 if donorname=="F.W. Deptford (Over) Ltd"
replace uksic=. if donorname=="FC Fund Managers Ltd"
* Fund Managers
replace uksic=66000 if donorname=="FC Fund Managers Ltd"
replace uksic=64999 if donorname=="FCT Europe Ltd"
replace uksic=62012 if donorname=="FIL"
replace uksic=41100 if donorname=="FK Facades Ltd"
* took first code mentioned for above
replace uksic=42110 if donorname=="FM Conway Ltd"
replace uksic=25110 if donorname=="FPE Global"
* took first code mentioned for above
replace uksic=10210 if donorname=="Faccenda Foods Ltd"
replace uksic=68320 if donorname=="Fairhome Asset Management Ltd"
replace uksic=64203 if donorname=="Fairview New Homes Ltd"
replace uksic=86101 if donorname=="Fairhome Care Group (W.L.) Ltd"
replace uksic=46380 if donorname=="Falfish Ltd"
replace uksic=10720 if donorname=="Farmhouse Biscuits Ltd"
replace uksic=68320 if donorname=="Fasset Ltd"
replace uksic=. if donorname=="Federal Aviation Ltd"
* ???
replace uksic=51000 if donorname=="Federal Aviation Ltd"
replace uksic=. if donorname=="Fenchurch Advisory Partners LLP"
* Financial Services
replace uksic=66000 if donorname=="Fenchurch Advisory Partners LLP"
replace uksic=. if donorname=="Ferguson Seacabs Ltd"
* Materials, Conatiners and Packaging
replace uksic=30000 if donorname=="Ferguson Seacabs Ltd"
replace uksic=49140 if donorname=="Fergusons Transport Ltd"
replace uksic=22290 if donorname=="Fibrelite Composites Ltd"
replace uksic=47790 if donorname=="Fielding & Nicholson Tailoring Ltd"
replace uksic=68320 if donorname=="Fifth Capital London Ltd"
replace uksic=68201 if donorname=="Filmgrain Ltd"
replace uksic=90030 if donorname=="Fine Art Commissions Ltd"
replace uksic=68209 if donorname=="Finemere Ltd"
replace uksic=69201 if donorname=="Finn-Kelcey & Chapman Ltd"
replace uksic=82990 if donorname=="Finsbury Ltd"
replace uksic=55100 if donorname=="Firoka (Heythrop Park) Ltd"
* took first code mentioned for above
replace uksic=68209 if donorname=="First Belgravia Properties Ltd"
replace uksic=. if donorname=="First Continental Trading Europe Ltd"
* Offering risk management services 
replace uksic=66000 if donorname=="First Continental Trading Europe Ltd"
replace uksic=82990 if donorname=="First Corporate Consultants Ltd"
replace uksic=96090 if donorname=="First Corporate Shipping Ltd"
replace uksic=49410 if donorname=="Fitzmaurice Holdings Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Fizz Fireworks Ltd"
* Providing professional firework display 
replace uksic=90000 if donorname=="Fizz Fireworks Ltd"
replace uksic=82990 if donorname=="Flairford Securities Ltd"
replace uksic=98000 if donorname=="Flambards Ltd"
replace uksic=93210 if donorname=="Flamingo Land Ltd"
replace uksic=82990 if donorname=="Flexible Securities Ltd"
replace uksic=22290 if donorname=="Floplast Ltd"
replace uksic=. if donorname=="Florence Kaufmann"
* No information on this company as the name resembles person’s name on internet
replace uksic=64999 if donorname=="Flowidea Ltd"
replace uksic=93120 if donorname=="Fly (Fu Lai) Aviation Ltd"
replace uksic=70229 if donorname=="Flying Lion Ltd"
replace uksic=. if donorname=="Folkes Holdings Ltd"
* Delivering investment and planning solutions
replace uksic=66000 if donorname=="Folkes Holdings Ltd"
replace uksic=77320 if donorname=="Fork Rent Plc"
replace uksic=. if donorname=="Formula Won Ltd"
* Delivering consultancy on media recruitment and advertising
replace uksic=73000 if donorname=="Formula Won Ltd"
replace uksic=99999 if donorname=="Forset Court Ltd"
replace uksic=25990 if donorname=="Fort Vale Engineering Ltd"
replace uksic=70100 if donorname=="Fort Vale Ltd"
replace uksic=49410 if donorname=="Fortec Distribution Network Ltd"
replace uksic=. if donorname=="Fortress Hold Howard"
* No information available on this company
replace uksic=64203 if donorname=="Foster Yeoman Ltd"
replace uksic=68209 if donorname=="Fox Pitt Kelton Ltd"
replace uksic=23490 if donorname=="Francis & Jellyman Ltd"
replace uksic=68100 if donorname=="Francis Evans Ltd"
* took first code mentioned for above
replace uksic=11050 if donorname=="Frederic Robinson Ltd"
replace uksic=41202 if donorname=="Frithsden Construction"
replace uksic=64999 if donorname=="Frognal Associates Ltd"
replace uksic=82990 if donorname=="Frys Properties Ltd"
replace uksic=. if donorname=="Fujitsu Services Ltd"
* Delivering IT and digital services
replace uksic=74000 if donorname=="Fujitsu Services Ltd"
replace uksic=. if donorname=="Fulham Investment & Property Co."
* No information on this company
replace uksic=68100 if donorname=="Fulham Investment & Property Co."
replace uksic=47599 if donorname=="Furniture Village Ltd"
replace uksic=70100 if donorname=="Furrow Holdings Ltd"
replace uksic=71111 if donorname=="Future Management Ltd"
replace uksic=68320 if donorname=="Future Management Services Ltd"
replace uksic=46180 if donorname=="Future Pipe Ltd"
replace uksic=82990 if donorname=="G Collins & Sons"
replace uksic=46760 if donorname=="G&M Supplies (Cumbria) Ltd"
* took first code mentioned for above
replace uksic=2222 if donorname=="GA Pindar & Son Ltd"
replace uksic=. if donorname=="GCH Capital Ltd"
* Delivering investment management 
replace uksic=66000 if donorname=="GCH Capital Ltd"
replace uksic=64209 if donorname=="GCH Corporation Ltd"
replace uksic=64205 if donorname=="GFI Holdings Ltd"
replace uksic=62020 if donorname=="GML Consulting Ltd"
replace uksic=66110 if donorname=="GR Software and Research Ltd"
replace uksic=70229 if donorname=="GRC Ltd"
replace uksic=70229 if donorname=="GS Medical Practice Ltd"
* took first code mentioned for above
replace uksic=98000 if donorname=="GSP Real Estate Ltd"
replace uksic=. if donorname=="Gala Leisure Ltd"
* Gambling and casinos
replace uksic=92000 if donorname=="Gala Leisure Ltd"

replace uksic=. if donorname=="Galashiels Union Club Company Ltd"
* Sports
replace uksic=93000 if donorname=="Galashiels Union Club Company Ltd"
replace uksic=66120 if donorname=="Galaxy Asset Management Ltd"
replace uksic=82990 if donorname=="Galaxy Sports Management Ltd"
replace uksic=. if donorname=="Gallagher Developments Holdco Ltd"
* Buying and selling own real estate
replace uksic=68100 if donorname=="Gallagher Developments Holdco Ltd"
replace uksic=68100 if donorname=="Gallagher UK Ltd"
replace uksic=41100 if donorname=="Galliard Homes Ltd"
replace uksic=68100 if donorname=="Gaming International Ltd"
* took first code mentioned for above
replace uksic=25990 if donorname=="Garrandale Ltd"
replace uksic=01420 if donorname=="Gascoines Group Ltd"
replace uksic=52290 if donorname=="Gatwick Airport Ltd"
replace uksic=43330 if donorname=="General & Technical Flooring Services Ltd"
replace uksic=70100 if donorname=="General Commercial Agencies Ltd"
replace uksic=66220 if donorname=="General Insurance Brokers UK Ltd"
replace uksic=86230 if donorname=="Genix Healthcare Ltd"
replace uksic=. if donorname=="George Downling Construction Ltd"
* Construction
replace uksic=41100 if donorname=="George Downling Construction Ltd"
replace uksic=47110 if donorname=="George Hammond Plc"
replace uksic=41100 if donorname=="Gertler Properties Services Ltd"
replace uksic=68320 if donorname=="Gilbran (Management) Ltd"
replace uksic=70100 if donorname=="Giles W Pritchard-Gordon & Co"
replace uksic=32990 if donorname=="Giram UK Ltd"
replace uksic=70100 if donorname=="Glengate Holding Plc"
replace uksic=68130 if donorname=="Glentree Estates Ltd"
replace uksic=80100 if donorname=="Glevum Security Ltd"
replace uksic=74909 if donorname=="Global Brands Ltd"
replace uksic=11070 if donorname=="Global Functional Drinks UK Ltd"
replace uksic=70229 if donorname=="Global Strategy Ltd"
replace uksic=46190 if donorname=="Globus (Shetland) Ltd"
replace uksic=. if donorname=="Gloucester Research Ltd"
* No information available on this company
replace uksic=45111 if donorname=="Glyn Hopkin Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Go in Four Ltd"
* Demolition
replace uksic=43110 if donorname=="Go in Four Ltd"
replace uksic=. if donorname=="Google Inc."
* IT
replace uksic=63000 if donorname=="Google Inc."
replace uksic=70100 if donorname=="Goonvean Holdings Ltd"
replace uksic=73110 if donorname=="Gough Bailey Wright Ltd"
replace uksic=70221 if donorname=="Grace Hotels (UK) Ltd"
replace uksic=56290 if donorname=="Grampian Foods Ltd"
replace uksic=74990 if donorname=="Grange ( Birkenhead) Property Co. Ltd"
replace uksic=74990 if donorname=="Grant Thornton"
replace uksic=68100 if donorname=="Grantham Investments Ltd"
* took first code mentioned for above
replace uksic=26110 if donorname=="Graphic Plc"
replace uksic=82990 if donorname=="Gravelly Hill Unionist (Buildings) Ltd"
replace uksic=55100 if donorname=="Grayshott Leisure Ltd"
replace uksic=41100 if donorname=="Great Homes Ltd"
replace uksic=01110 if donorname=="Great Lodge Farms Ltd"
* took first code mentioned for above
replace uksic=68100 if donorname=="Great Northern Hotels Ltd"
replace uksic=35140 if donorname=="Green Network Plc"
replace uksic=13939 if donorname=="Greenwood and Coope Ltd"
replace uksic=64209 if donorname=="Gresham Research Investments & Trading Ltd"
replace uksic=32990 if donorname=="Griffin Enamellers Ltd"
replace uksic=82990 if donorname=="Gross-Hill Properties Ltd"
replace uksic=70100 if donorname=="Grosvenor Ltd"
replace uksic=68209 if donorname=="Grosvenor Securities Ltd"
replace uksic=82990 if donorname=="Growing Green Ltd"
replace uksic=70221 if donorname=="Growth Financial Services Ltd"
replace uksic=. if donorname=="Growth Partner LLP"
* Consumer focussed investor 
replace uksic=66000 if donorname=="Growth Partner LLP"
replace uksic=82990 if donorname=="Gulfstream Aerospace Corp"
replace uksic=85100 if donorname=="Gwendolen House Nursery School Ltd"
replace uksic=. if donorname=="H & C Whitehead Ltd"
* Textile services
replace uksic=71000 if donorname=="H & C Whitehead Ltd"
 replace uksic=80100 if donorname=="H & M Security Services Ltd"
 replace uksic=49390 if donorname=="HATS (Private Hire) Ltd"
 replace uksic=41201 if donorname=="HBC Group"
* took first code mentioned for above
 replace uksic=65110 if donorname=="HBFS Financial Services Ltd"
* took first code mentioned for above
 replace uksic=86101 if donorname=="HCA International Ltd"
 replace uksic=. if donorname=="HDI Capital Partners LLP"
* Investment management
replace uksic=66000 if donorname=="HDI Capital Partners LLP"
 replace uksic=. if donorname=="HIG Services Ltd"
* Medical electrical Specialists
 replace uksic=71000 if donorname=="HIG Services Ltd"

 replace uksic=66190 if donorname=="HMCA/S Plc"
 replace uksic=. if donorname=="HR Owen Plc"
* Car sales
 replace uksic=45000 if donorname=="HR Owen Plc"
 replace uksic=. if donorname=="HT & Co (Drinks) Ltd"
* Groceries and drinks
 replace uksic=46000 if donorname=="HT & Co (Drinks) Ltd"
 replace uksic=68209 if donorname=="Hadleigh Industrial Estates Ltd"
 replace uksic=. if donorname=="Hadley Industries Holdings Ltd"
* No information available on this company 
replace uksic=56101 if donorname=="Hakkasan Ltd"
 replace uksic=. if donorname=="Halfway Conservative Hall Ltd"
* No information on this company
 replace uksic=80420 if donorname=="Halifax College (UK) Ltd"
 replace uksic=24420 if donorname=="Hall & Botterill"
* took first code mentioned for above
 replace uksic=01190 if donorname=="Hall Hunter Partnership Ltd"
 replace uksic=70100 if donorname=="Hallmark Care Home Holdings Ltd"
 replace uksic=99999 if donorname=="Hallmark Developments (NW) Ltd"
 replace uksic=. if donorname=="Halo Living Ltd"
* Furniture
replace uksic=31000 if donorname=="Halo Living Ltd"
 replace uksic=74990 if donorname=="Hambrook Estate Ltd"
 replace uksic=41100 if donorname=="Hammill Properties Ltd"
 replace uksic=. if donorname=="Hammonds Produce Ltd"
* Farming
replace uksic=01000 if donorname=="Hammonds Produce Ltd"
 replace uksic=70100 if donorname=="Hampden Insurance Holdings"
* took first code mentioned for above
 replace uksic=44100 if donorname=="Hamptonline Ltd"
 replace uksic=74909 if donorname=="Hanover Communications International Ltd"
 replace uksic=. if donorname=="Hanson Transport Group Ltd"
* Trucking transportation services
 replace uksic=49000 if donorname=="Hanson Transport Group Ltd"
 replace uksic=96090 if donorname=="Hapworth Ltd"
 replace uksic=64209 if donorname=="Harbour International Ltd"
 replace uksic=93210 if donorname=="Harbour Park Ltd"
 replace uksic=69202 if donorname=="Hargenant Ltd"
 replace uksic=64205 if donorname=="Hargreave Hale Ltd"
 replace uksic=55100 if donorname=="Harilela Hotels (UK) Ltd"
 replace uksic=16100 if donorname=="Harlow Bros. Ltd"
* took first code mentioned for above
 replace uksic=01110 if donorname=="Harnage Estates Ltd"
 replace uksic=41202 if donorname=="Haron Seven Ltd"
 replace uksic=47789 if donorname=="Harrington & Hallworth Ltd"
 replace uksic=68209 if donorname=="Harris & Sheldon Group Ltd"
* took first code mentioned for above
 replace uksic=68209 if donorname=="Harris Ventures Ltd"
 replace uksic=68209 if donorname=="Hartham Park Ltd"
 replace uksic=70100 if donorname=="Hartley (Head Office) Ltd"
 replace uksic=96090 if donorname=="Hartley Property Trust Ltd"
 replace uksic=73120 if donorname=="Hartmann Media"
 replace uksic=. if donorname=="Harvey Softeners Ltd"
* No information on this company
 replace uksic=28990 if donorname=="Harvey Water Softeners Ltd"
 replace uksic=. if donorname=="Harwood Capital LLP"
* Capital management
 replace uksic=66000 if donorname=="Harwood Capital LLP"
 replace uksic=66220 if donorname=="Hastings Direct Ltd"
 replace uksic=51102 if donorname=="Haughey Air Ltd"
 replace uksic=47789 if donorname=="Hauser and Wirth Gallery Ltd"
 replace uksic=68209 if donorname=="Hawthorns Braintree Ltd"
 replace uksic=70100 if donorname=="Haymarket Publishing Services"
 replace uksic=. if donorname=="Headstock Distribution"
 replace donorname="Headstock Distribution Ltd" if donorname=="Headstock Distribution"
 replace uksic=27900 if donorname=="Headstock Distribution Ltd"
* took first code mentioned for above
 replace uksic=25990 if donorname=="Heap and Partners Ltd"
 replace uksic=. if donorname=="Heaton Holdingwws Ltd"
* Property investments and business park management
 replace uksic=68100 if donorname=="Heaton Holdingwws Ltd"
 replace uksic=. if donorname=="Helical Bar Plc"
* No information available on this company
 replace uksic=. if donorname=="Henfield Lodge Aviation"
* Aviation 
replace uksic=51000 if donorname=="Henfield Lodge Aviation"
 replace uksic=74990 if donorname=="Henley Concierge Ltd"
 replace uksic=68209 if donorname=="Hi-Tec Finishers (Holdings) Ltd"
 replace uksic=70229 if donorname=="Higham View Consultancy Services Ltd"
* took first code mentioned for above
 replace uksic=82990 if donorname=="Hill Group Services Ltd"
 replace uksic=. if donorname=="Hills Ltd"
* No information on this company
 replace uksic=68100 if donorname=="Hindmarch Properties Ltd"
* took first code mentioned for above
 replace uksic=79110 if donorname=="Hino Flights Ltd"
 replace uksic=41100 if donorname=="Hobden Projects Ltd"
 replace uksic=45111 if donorname=="Hobson Industries Ltd"
* took first code mentioned for above
 replace uksic=41202 if donorname=="Hodson Developments Ltd"
 replace uksic=55100 if donorname=="Hogarths Hotel Ltd"
* took first code mentioned for above
 replace uksic=. if donorname=="Holding & Barnes Plc"
* Vehicle specialists from motorbikes to trucks 
 replace uksic=45100 if donorname=="Holding & Barnes Plc"
 replace uksic=. if donorname=="Holiday Autos Group Ltd"
* Rental cars 
 replace uksic=77100 if donorname=="Holiday Autos Group Ltd"
 replace uksic=47781 if donorname=="Holland Park Galleries Ltd"
 replace uksic=41100 if donorname=="Hollyhedge Ltd"
 replace uksic=68209 if donorname=="Honeywood Enterprises Ltd"
 replace uksic=. if donorname=="Hope Learning Solutions Ltd"
* Business and management consultations
 replace uksic=82990 if donorname=="Hope Learning Solutions Ltd"
 replace uksic=41202 if donorname=="Hopkins Homes Ltd"
 replace uksic=41202 if donorname=="Hopkins and Moore (Developments) Ltd"
 replace uksic=46420 if donorname=="Hornby Street Ltd"
 replace uksic=68209 if donorname=="Horta Properties Ltd"
 replace uksic=96090 if donorname=="Hospital Ambulance Car Service Ltd"
 replace uksic=. if donorname=="Hospitality Line Ltd"
* Online services to recruiting agencies
replace uksic=63100 if donorname=="Hospitality Line Ltd"
 replace uksic=. if donorname=="Hotcourses Ltd"
* Course search provider
replace uksic=63100 if donorname=="Hotcourses Ltd"
 replace uksic=74909 if donorname=="Hotham Services Ltd"
 replace uksic=56101 if donorname=="House Special Ltd"
 replace uksic=65120 if donorname=="Howden Group UK Ltd"
 replace uksic=65120 if donorname=="Howden Insurance Brokers Ltd"
 replace uksic=62012 if donorname=="Howells Associates Ltd"
 replace uksic=61900 if donorname=="Huawei Technologies (UK) Co Ltd"
 replace uksic=58190 if donorname=="Hub Media"
 replace uksic=28990 if donorname=="Hughes Safety Showers Ltd"
 replace uksic=96090 if donorname=="Huntingdon Life Sciences Ltd"
 replace uksic=64209 if donorname=="Huntswood Associates Ltd"
 replace uksic=70100 if donorname=="Huntsworth Plc"
 replace uksic=68209 if donorname=="Hybeck Holdings Ltd"
* took first code mentioned for above
 replace uksic=28990 if donorname=="Hydro Industries Ltd"
 replace uksic=. if donorname=="I M Properties Plc"
* Investment and land development
 replace uksic=68100 if donorname=="I M Properties Plc"
replace uksic=. if donorname=="I-CD Publishing Ltd"
* Offers solutions to set online publishing (design)
replace uksic=62000 if donorname=="I-CD Publishing Ltd"
replace uksic=70100 if donorname=="I.M. Properties Plc"
replace uksic=46510 if donorname=="IC Technology UK Ltd"
replace uksic=70100 if donorname=="ICAP Management Services Ltd"
replace uksic=. if donorname=="ICAP Plc"
* Electronic financial market and post trade business 
replace uksic=66000 if donorname=="ICAP Plc"
replace uksic=43210 if donorname=="IDS Electrical Ltd"
replace uksic=82990 if donorname=="IEP Property Consultants Ltd"
replace uksic=. if donorname=="IGPL Ltd"
* Chemical manufacturing company
replace uksic=20000 if donorname=="IGPL Ltd"
replace uksic=96090 if donorname=="IIR Ltd"
replace uksic=. if donorname=="IIR Training Ltd"
* No information on this company
replace uksic=85000 if donorname=="IIR Training Ltd"
replace uksic=70100 if donorname=="IM Group Ltd"
replace uksic=70100 if donorname=="IM Properties Plc"
replace uksic=64209 if donorname=="IPGL Ltd"
replace uksic=. if donorname=="ISIS Business Solutions (Northants) LLP"
* Business and accountancy solutions 
replace uksic=69000 if donorname=="ISIS Business Solutions (Northants) LLP"
replace uksic=46190 if donorname=="IVS Group Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="Ignis Ltd"
replace uksic=41100 if donorname=="Ilchester Estates"
* took first code mentioned for above
replace uksic=82990 if donorname=="Ilsley Holdings Ltd"
replace uksic=70100 if donorname=="Imagination Industries Incubator Ltd"
replace uksic=59200 if donorname=="Immedia Broadcast Ltd"
replace uksic=74909 if donorname=="Impressions of China Ltd"
replace uksic=66220 if donorname=="In2matrix UK Ltd"
replace uksic=10710 if donorname=="Indulgence Patisserie Ltd"
replace uksic=20130 if donorname=="Industrial Chemicals Ltd"
* took first code mentioned for above
replace uksic=81100 if donorname=="Industrial Maintenance Services Ltd"
replace uksic=55100 if donorname=="Inglewood Palm Hotel"
replace uksic=70100 if donorname=="Inmarsat Plc"
replace uksic=. if donorname=="Intela Consulting Ltd"
* Provides sales lead and intelligence data
replace uksic=73000 if donorname=="Intela Consulting Ltd"
replace uksic=50200 if donorname=="InterMarine Offshore Services"
replace uksic=. if donorname=="Intercapital Private Group Ltd"
* wholesale money and securities brokerage services
replace uksic=66000 if donorname=="Intercapital Private Group Ltd"

replace uksic=10200 if donorname=="Interfish Ltd"
* took first code mentioned for above
replace donorname="International Caledonian Asset Management Ltd" if donorname=="International Caledonian Assets"
replace uksic=. if donorname=="International Caledonian Asset Management Ltd"
* No information on this company
replace uksic=66000 if donorname=="International Caledonian Asset Management Ltd"
replace uksic=41100 if donorname=="International Hospitals Group Ltd"
* took first code mentioned for above
replace uksic=70100 if donorname=="International Motors Ltd"
replace uksic=72190 if donorname=="International Packaging Ltd"
* took first code mentioned for above
replace uksic=55202 if donorname=="Interpub Ltd"
* took first code mentioned for above
replace uksic=94990 if donorname=="Interval International Ltd"
replace uksic=70229 if donorname=="Intuition Publishing Ltd"
replace uksic=70100 if donorname=="Invenens Ltd"
replace uksic=66190 if donorname=="Investment Trust Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="Investors in Private Capital Ltd"
replace uksic=68320 if donorname=="Investream Ltd"
replace uksic=70210 if donorname=="Invicta Public Affairs (Group) Ltd"
replace uksic=. if donorname=="IronFX Global UK Ltd"
* Online trading
replace uksic=66000 if donorname=="IronFX Global UK Ltd"
replace uksic=. if donorname=="Irwin Mitchell LLP"
* Soliciting services
replace uksic=69102 if donorname=="Irwin Mitchell LLP"
replace uksic=7011 if donorname=="Island Harbour Ltd"
replace uksic=47781 if donorname=="Ivor Braka Ltd"
replace uksic=20150 if donorname=="J & H Bunn Ltd"
replace uksic=39000 if donorname=="J & H Bunn Ltd"
replace uksic=. if donorname=="J A Pye (Oxford) Ltd"
* Law and judgment area
replace uksic=69100 if donorname=="J A Pye (Oxford) Ltd"
replace uksic=7011 if donorname=="J G Management Ltd"
replace uksic=70100 if donorname=="J Marr Ltd"
replace uksic=46711 if donorname=="J R Rix & Sons Ltd"
* took first code mentioned for above
replace uksic=41202 if donorname=="J Scott (Thrapston) Ltd"
replace uksic=68209 if donorname=="J Wharton Shipping Ltd"
replace uksic=59112 if donorname=="J&E Higham & Co Ltd"
replace uksic=39112 if donorname=="J&H Sales (International) Ltd"
replace uksic=28922 if donorname=="JC Bamford Excavators Ltd"
replace uksic=70100 if donorname=="J. T Leavesley Ltd"
replace uksic=41202 if donorname=="J.A.Pye (Oxford) Ltd"
replace uksic=28922 if donorname=="J.C.B. Service"
replace uksic=41202 if donorname=="J.S. Bloor (Services) Ltd"
replace uksic=28922 if donorname=="JB Drax Honore (UK) Ltd"
replace uksic=. if donorname=="JCCO 110 Ltd"
* No information on this company
replace uksic=82990 if donorname=="JFB Management Ltd"
replace uksic=70100 if donorname=="JR & F Ltd"
replace uksic=82990 if donorname=="JRJ Investments Ltd"
replace uksic=. if donorname=="JRJ Venture LLP"
* Financial services
replace uksic=66000 if donorname=="JRJ Venture LLP"
replace uksic=70100 if donorname=="JT Leavesley Ltd"
replace uksic=. if donorname=="Jacksons Bournemouth Ltd"
* Retail and sale of new and used automobiles 
replace uksic=45111 if donorname=="Jacksons Bournemouth Ltd"
replace uksic=45111 if donorname=="Jarretts Motors"
replace uksic=14132 if donorname=="Jayroma (London) Ltd"
replace uksic=68320 if donorname=="Jeffrey Management Ltd"
replace uksic=82990 if donorname=="Jermyn Consultancy Services Ltd"
replace uksic=69201 if donorname=="Jerroms Priddey Ltd"
replace uksic=41202 if donorname=="Jersey (Developments) Ltd"
replace uksic=56101 if donorname=="Jewelite Trading Ltd"
replace uksic=41201 if donorname=="Joannou & Parakevaides UK Ltd"
replace uksic=. if donorname=="John Clark (Holdings) Ltd"
* took first code mentioned for above
replace uksic=13950 if donorname=="John Cotton Group Ltd"
replace uksic=49410 if donorname=="John Dickinson Transport Ltd"
replace uksic=46342 if donorname=="John E Fells & Sons Ltd"
replace uksic=. if donorname=="John Gosden Racing LLP"
* Racehorse trainer
replace uksic=93199 if donorname=="John Gosden Racing LLP"
replace uksic=41100 if donorname=="John Lynch Builders Ltd"
* took first code mentioned for above
replace uksic=46130 if donorname=="John Nicholls (Trading) Ltd"
* took first code mentioned for above
replace uksic=41100 if donorname=="Johnsey Estates 1990 Ltd"
replace uksic=68100 if donorname=="Joint London Holdings Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="Juniper Property Finance Company Ltd"
replace uksic=68209 if donorname=="KGL (Estates) Ltd"
replace uksic=70229 if donorname=="KJ Costa Advisory Ltd"
replace uksic=. if donorname=="KPMG"
* Accounting services
replace uksic=69201 if donorname=="KPMG"
replace uksic=55100 if donorname=="KRNS Properties Ltd"
replace uksic=82990 if donorname=="Karajan Ltd"
replace uksic=56101 if donorname=="Karali Ltd"
replace uksic=10710 if donorname=="Kashmir Crown Bakeries"
* took first code mentioned for above
replace uksic=. if donorname=="Katisouris (Fresh Foods) Ltd"
* Foods production
replace uksic=10000 if donorname=="Katisouris (Fresh Foods) Ltd"
replace uksic=46990 if donorname=="Katsouris Bros Ltd"
replace uksic=. if donorname=="Kelson Place Asset Management Ltd"
* Fund management
replace uksic=66000 if donorname=="Kelson Place Asset Management Ltd"
replace uksic=43110 if donorname=="Keltbray Ltd"
replace uksic=74990 if donorname=="Kensington & Chelsea Aviation Ltd"
replace uksic=43390 if donorname=="Kensington Developers (1991) Ltd"
replace uksic=41100 if donorname=="Kensington Development"
replace uksic=41100 if donorname=="Kensington Developments (1991) Ltd"
replace uksic=. if donorname=="Kentaro Ltd"
* identifying and representing talents
replace uksic=90020 if donorname=="Kentaro Ltd"
replace uksic=. if donorname=="Kerr Mcgee Oil UK Plc"
* Energy and oil
replace uksic=35100 if donorname=="Kerr Mcgee Oil UK Plc"
replace uksic=66220 if donorname=="Kerry London Ltd"
replace uksic=77320 if donorname=="Keyway Ltd"
replace uksic=32990 if donorname=="Kimbolton Fireworks Retail Ltd"
replace uksic=. if donorname=="Killik & Co"
* Saving, planning, and investment
replace uksic=66000 if donorname=="Killik & Co"
replace uksic=68209 if donorname=="Kiltane Developments Ltd"
replace uksic=82990 if donorname=="Kim Bailey Racing Ltd"
replace uksic=. if donorname=="King Sturge LLP"
* Property consultancy
replace uksic=68100 if donorname=="King Sturge LLP"
replace uksic=43999 if donorname=="Kingsley Developers Ltd"
replace uksic=702209 if donorname=="Kinmont Ltd"
replace uksic=55900 if donorname=="Kinvena Homes Ltd"
replace uksic=68201 if donorname=="Kirkglade Ltd"
replace uksic=68100 if donorname=="Kirklee Property Company (2) Ltd"
replace uksic=49410 if donorname=="Kirkvale Ltd"
replace uksic=68209 if donorname=="Klassik Property Ltd"
replace uksic=41100 if donorname=="Knight Developments Ltd"
replace uksic=96090 if donorname=="Knight Security Ltd"
replace uksic=64990 if donorname=="Knole Park Golf Club Ltd"
replace uksic=49410 if donorname=="Knowles (Transport) Ltd"
replace uksic=70229 if donorname=="Kohima Ventures Ltd"
replace uksic=70229 if donorname=="L Marks Ltd"
replace uksic=77320 if donorname=="L.Lynch (Holdings) Ltd"
replace uksic=31090 if donorname=="LBI Ltd"
replace uksic=20590 if donorname=="LNT Solutions Ltd"
replace uksic=68209 if donorname=="LTC Investment Ltd"
replace uksic=74909 if donorname=="LWE Ltd"
replace uksic=. if donorname=="LXM Finance LLP"
* Finance services
replace uksic=66000 if donorname=="LXM Finance LLP"
replace uksic=01110 if donorname=="Ladykirk Estates Ltd"
* took first code mentioned for above
replace uksic=55100 if donorname=="Lakeside Country Club"
replace uksic=44100 if donorname=="Lakeside Developments Ltd"
replace uksic=68320 if donorname=="Lamberhurst Holdings Ltd"
replace uksic=. if donorname=="Lancaster Knox LLP"
* Accounting services
replace uksic=69201 if donorname=="Lancaster Knox LLP"
replace uksic=80100 if donorname=="Land Sheriffs Ltd"
replace uksic=46342 if donorname=="Laurent-Perrier UK Ltd"
replace uksic=68302 if donorname=="Lawrence Rand (Eastcote) Ltd"
replace uksic=64209 if donorname=="Lazari Investments Ltd"
* took first code mentioned for above
replace uksic=56101 if donorname=="Le Gavroche Ltd"
replace uksic=74909 if donorname=="Learning Enterprises Organisation Ltd"
replace uksic=. if donorname=="Lee Park Properties"
* Properties 
replace uksic=68100 if donorname=="Lee Park Properties"
replace uksic=82990 if donorname=="Leicester Square Box Office Ltd"
replace uksic=. if donorname=="Leigh Conservative Club Building Co Ltd"
* No information available on this company
replace uksic=70100 if donorname=="Leisure Training Corporation Ltd"
* took first code mentioned for above
replace uksic=70100 if donorname=="Lewis Trust Group Ltd"
replace uksic=32990 if donorname=="Lewmar Ltd"
replace uksic=46720 if donorname=="Liberty Commodities Ltd"
replace uksic=66190 if donorname=="Liberum Capital Ltd"
replace uksic=70100 if donorname=="Libra Capital Ltd"
replace uksic=82990 if donorname=="Libra Group Services Ltd"
replace uksic=47510 if donorname=="Libra Textiles Ltd"
* took first code mentioned for above
replace uksic=5010 if donorname=="Lifestyle Executive Vehicles Ltd"
replace uksic=87300 if donorname=="Lifetime Care Ltd"
replace uksic=85590 if donorname=="Lifetime Training Group Ltd"
replace uksic=35110 if donorname=="Lightsource Renewable Energy Ltd"
replace uksic=70221 if donorname=="Lion Associates Ltd"
replace uksic=45111 if donorname=="Listers Group Ltd"
replace uksic=25930 if donorname=="Litchfield Bros Ltd"
replace uksic=68100 if donorname=="Lizon Properties Ltd"
replace uksic=10611 if donorname=="Lloyd's Animal Feeds"
* took first code mentioned for above
replace uksic=68201 if donorname=="Loades Plc"
replace uksic=47789 if donorname=="Lockwood (Leamington) Ltd"
replace uksic=3420 if donorname=="Lola Cars International Ltd"
replace uksic=41100 if donorname=="London & Bath Esates Group Ltd"
replace uksic=. if donorname=="London & Regional Properties Ltd"
* Real estate
replace uksic=68100 if donorname=="London & Regional Properties Ltd"
replace uksic=68209 if donorname=="London & Westcountry Estates Ltd"
replace uksic=73110 if donorname=="London Advertising Ltd"
replace uksic=68209 if donorname=="London & Westcountry Estates Ltd"
replace uksic=. if donorname=="London Borough of Waltham Forest Conservative Council Group"
* No information available on this company
replace uksic=. if donorname=="London Diversified Fund Management (UK) Ltd"
* Fund management
replace uksic=66000 if donorname=="London Diversified Fund Management (UK) Ltd"
replace uksic=91020 if donorname=="London Film Museum (Covent Garden) Ltd"
replace uksic=90030 if donorname=="London Films Ltd"
replace uksic=41100 if donorname=="London Leisure Services Ltd"
replace uksic=86210 if donorname=="London Maternity and Birth Services Ltd"
replace uksic=86900 if donorname=="London Secure Services Ltd"
replace uksic=86900 if donorname=="London Square Developments Ltd"
* took first code mentioned for above
replace uksic=68320 if donorname=="London and Regional Properties Ltd"
replace uksic=08110 if donorname=="Longcliffe Quarries Ltd"
replace uksic=64303 if donorname=="Longrow Capital Ltd"
replace uksic=47510 if donorname=="Loose End Fabrics Ltd"
replace uksic=46450 if donorname=="Louise Galvin Ltd"
replace uksic=68100 if donorname=="Lousada Ltd"
replace uksic=68209 if donorname=="Love Lane Investments Ltd"
replace uksic=25720 if donorname=="Lowe & Fletcher Ltd"
replace uksic=64209 if donorname=="Lowman Manufacturing Company Ltd"
replace uksic=82990 if donorname=="Lowry Trading Ltd"
replace uksic=47620 if donorname=="Lucid Direct Ltd"
replace uksic=61900 if donorname=="Lycamobile UK Ltd"
replace uksic=73110 if donorname=="M & C Saatchi Ltd"
replace uksic=70110 if donorname=="M & C Saatchi Plc"
* took first code mentioned for above
replace uksic=46900 if donorname=="M & M Supplies (UK) Plc"
replace uksic=70100 if donorname=="M J Barrett Group Ltd"
replace uksic=45111 if donorname=="M M Bellinger & Sons Ltd"
replace uksic=. if donorname=="MAB Partners LLP"
* Financial and investment
replace uksic=66000 if donorname=="MAB Partners LLP"
replace uksic=82990 if donorname=="MBU Capital Ltd"
replace uksic=74990 if donorname=="MCR Property Group"
* No information available on this company
replace uksic=82990 if donorname=="MECM Ltd"
replace uksic=42990 if donorname=="MF Freeman Ltd"
replace uksic=. if donorname=="MP Bio Science International Ltd"
* Sports supplements manufacturer 
replace uksic=10890 if donorname=="MP Bio Science International Ltd"
replace uksic=42990 if donorname=="MPB Structures Ltd"
replace uksic=56101 if donorname=="MPW Parisienne Restaurants Ltd"
replace uksic=56103 if donorname=="MSG Commercial"
replace uksic=56103 if donorname=="MSG Sandhurst Ltd"
replace uksic=70100 if donorname=="MWL International Ltd"
replace donorname="Mabey Development (South West)" if donorname=="Mabey Holdings Ltd"
replace uksic=. if donorname=="Mabey Development (South West)"
* Civil constructions 
replace uksic=41200 if donorname=="Mabey Development (South West)"
replace uksic=. if donorname=="Mabey Securities Ltd"
* No information available on this company 
replace uksic=66000 if donorname=="Mabey Securities Ltd"
replace uksic=82990 if donorname=="Macdonagh Wright Ltd"
replace uksic=46610 if donorname=="Machine Link Ltd"
replace uksic=10831 if donorname=="Mackwoods Ltd"
* took first code mentioned for above
replace uksic=25620 if donorname=="Maher Ltd"
replace uksic=99999 if donorname=="Majormark Ltd"
replace uksic=99999 if donorname=="Malabar Capital Ltd"
replace uksic=70229 if donorname=="Managing the Service Business Ltd"
replace uksic=. if donorname=="Manchester & Metropolitan Investment Ltd"
* Investment 
replace uksic=66000 if donorname=="Manchester & Metropolitan Investment Ltd"
replace uksic=64991 if donorname=="Manro Haydan Trading"
replace uksic=46760 if donorname=="Marchington Stone Ltd"
replace uksic=68320 if donorname=="Marcus Cooper Property Consulting Ltd"
replace uksic=56101 if donorname=="Margintest Ltd"
replace uksic=64991 if donorname=="Maritime Orient & Near East Agency Ltd"
replace uksic=. if donorname=="Markland Holdings Ltd"
* Commercial properties investment 
replace uksic=68100 if donorname=="Markland Holdings Ltd"

replace uksic=43999 if donorname=="Martek Contracts Ltd"
replace uksic=43320 if donorname=="Martek Joinery Ltd"
replace uksic=25110 if donorname=="Martin-Baker Aircraft Co Ltd"
replace uksic=70100 if donorname=="Martyn Rose Ltd"
replace uksic=. if donorname=="Marwyn Capital LLP"
* Investment 
replace uksic=66000 if donorname=="Marwyn Capital LLP"
replace uksic=82990 if donorname=="Mastcraft Ltd"
replace uksic=14190 if donorname=="Maurice Sedwell Savile Row Ltd"
replace uksic=47710 if donorname=="Max Studio (UK) Ltd"
* took first code mentioned for above
replace uksic=93210 if donorname=="Maximum Fun Devon Ltd"
replace uksic=. if donorname=="McAlpine Aviation Services Ltd"
* Aviation services
replace uksic=51000 if donorname=="McAlpine Aviation Services Ltd"
replace uksic=41100 if donorname=="McDowell's Development Company Ltd"
replace uksic=68209 if donorname=="Meekland Ltd"
replace uksic=41201 if donorname=="Melina Group Ltd"
* took first code mentioned for above
replace uksic=14132 if donorname=="Memo Fashions Ltd"
replace uksic=77390 if donorname=="Mems Power Generation Ltd"
replace uksic=68209 if donorname=="Merchant Services Ltd"
replace uksic=55100 if donorname=="Mere Golf & Country Club Limit"
* took first code mentioned for above
replace uksic=. if donorname=="Merebis Capital Management LLP"
* Commercial services
replace uksic=66000 if donorname=="Merebis Capital Management LLP"
replace uksic=45190 if donorname=="Merthyr Tydfil Car Auction Ltd"
replace uksic=18129 if donorname=="Metro Commercial Printing Ltd"
replace uksic=85310 if donorname=="Metropolitan International Schools Ltd"
* took first code mentioned for above
replace uksic=85310 if donorname=="Meydan Asset Management Ltd"
* took first code mentioned for above
replace uksic=18129 if donorname=="Michael R Dalby Ltd"
replace uksic=62020 if donorname=="Microsoft Ltd"
replace uksic=. if donorname=="Mid Sussex Conservative Club Ltd"
* Sports club
replace uksic=96090 if donorname=="Middleton Enterprises Ltd"
replace uksic=78109 if donorname=="MiddletonMurray Ltd"
* took first code mentioned for above
replace uksic=46390 if donorname=="Midland Chilled Foods Ltd"
replace uksic=99999 if donorname=="Midland Computer Services"
replace uksic=. if donorname=="Midland Software Ltd"
* Computer software
replace uksic=62012 if donorname=="Midland Software Ltd"
replace uksic=68320 if donorname=="Midstocket Development Co Ltd"
replace uksic=. if donorname=="Millcentro Ltd"
* No information available on this company
replace uksic=96090 if donorname=="Millway Shippers Ltd"
replace uksic=01110 if donorname=="Milton (Peterborough) Estates Company"
* took first code mentioned for above
replace uksic=64991 if donorname=="Milton Magna Ltd"
replace uksic=. if donorname=="Mint Equities Ltd"
* Institutional financial services
replace uksic=66000 if donorname=="Mint Equities Ltd"
replace uksic=65230 if donorname=="Mint Partners Ltd"
replace uksic=92000 if donorname=="Mirage Leisure Ltd"
replace uksic=55100 if donorname=="Mogford Ltd"
replace uksic=82990 if donorname=="Moore Europe Capital Management LLP"
replace uksic=68209 if donorname=="Moorlake Properties Ltd"
replace uksic=46740 if donorname=="Morco Products Ltd"
replace uksic=41100 if donorname=="Morelane Ltd"
replace uksic=68310 if donorname=="Morgan Brookes Plc"
replace uksic=7414 if donorname=="Morgan Howard"
* took first code mentioned for above
replace uksic=93199 if donorname=="Morley Hayes Leisure Ltd"
replace uksic=78300 if donorname=="Morson Group Ltd"
replace uksic=96090 if donorname=="Motion Picture Licensing Company (International) Ltd"
replace uksic=87100 if donorname=="Moundsley Hall Nursing Home"
replace uksic=86230 if donorname=="Mowbray Indigo Ltd"
replace uksic=46499 if donorname=="Mozafarian Jewellers Ltd"
replace uksic=85320 if donorname=="Mpower Training Solutions Ltd"
replace uksic=87300 if donorname=="Mulberry Care Ltd"
replace uksic=26309 if donorname=="Multitone Electronics Plc"
replace uksic=46320 if donorname=="Mutchmeats Ltd"
replace uksic=61100 if donorname=="NGC Networks Ltd"
replace uksic=46380 if donorname=="NH Case Ltd"
replace uksic=. if donorname=="NMB Holdings Ltd"
* Investment holding
replace uksic=66000 if donorname=="NMB Holdings Ltd"
replace uksic=56101 if donorname=="Nam Long Le Shaker Ltd"
replace uksic=49319 if donorname=="National Express Group Plc"
replace uksic=94110 if donorname=="National Pharmacy Association"
replace uksic=82990 if donorname=="Naya Capital Management UK Ltd"
replace uksic=62090 if donorname=="Netpremacy Ltd"
replace uksic=33190 if donorname=="Network Critical Physical Infrastructure Ltd"
* took first code mentioned for above
replace uksic=58110 if donorname=="New Architecture Group Ltd"
replace uksic=99999 if donorname=="New Career Skills Ltd"
replace uksic=82990 if donorname=="New Century Media Ltd"
replace uksic=78200 if donorname=="New Cross Nursing Group Ltd"
replace uksic=46120 if donorname=="New Field Ltd"
* took first code mentioned for above
replace uksic=70100 if donorname=="Newarthill Ltd"
replace uksic=. if donorname=="Newriver Retail (UK) Ltd"
* Property investor
replace uksic=68100 if donorname=="Newriver Retail (UK) Ltd"
replace uksic=58130 if donorname=="News International Ltd"
replace uksic=70100 if donorname=="Newship Group Ltd"
replace uksic=70100 if donorname=="Newship Ltd"
replace uksic=70100 if donorname=="Nex Services Ltd"
replace uksic=46439 if donorname=="Nexus Industries Ltd"
replace uksic=41100 if donorname=="Nicholas Holdings"
* took first code mentioned for above
replace uksic=41100 if donorname=="Nicholson Estates Plc"
replace uksic=70100 if donorname=="Nike Land Securities Ltd"
replace uksic=68209 if donorname=="Nine Asset Management Ltd"
replace uksic=55100 if donorname=="Nine hospitality Ltd"
replace uksic=96090 if donorname=="No 9 Investments Ltd"
replace uksic=. if donorname=="No1 Currency Ltd"
* Currency exchange
replace uksic=64999 if donorname=="No1 Currency Ltd"
replace uksic=10890 if donorname=="Noble Foods Ltd"
* took first code mentioned for above
replace uksic=41100 if donorname=="Noble House Services Ltd"
replace uksic=21200 if donorname=="Norbrook Laboratories"
replace uksic=46460 if donorname=="Norbrook Laboratories (GB) Ltd"
replace uksic=70100 if donorname=="Normanby Estate Holdings Ltd"
replace uksic=68100 if donorname=="Norseman Holdings Plc"
replace uksic=68209 if donorname=="North Banchory Company Ltd"
replace uksic=68209 if donorname=="North British Securities Ltd"
replace uksic=68100 if donorname=="North Norfolk Conservative Holdings Ltd"
replace uksic=. if donorname=="Northampton Machinery Co Ltd"
* Machinery suppliers
replace uksic=46100 if donorname=="Northampton Machinery Co Ltd"
replace uksic=. if donorname=="Northbrook Laboratories Ltd"
* No information available on this company
replace uksic=70100 if donorname=="Northern & Shell Plc"
replace uksic=68209 if donorname=="Northern Trust Company Ltd"
replace uksic=70100 if donorname=="Northminster Holdings Ltd"
replace uksic=70100 if donorname=="Northumbria Water Ltd"
replace uksic=74870 if donorname=="Norton Energy Solutions Ltd"
replace uksic=. if donorname=="Norwich Union Insurance Ltd"
* Life insurance
replace uksic=65110 if donorname=="Norwich Union Insurance Ltd"
replace uksic=55100 if donorname=="Number Eleven Ltd"
replace uksic=73110 if donorname=="OCI UK Ltd"
replace uksic=. if donorname=="ODL Securities Ltd"
* Trading and finance
replace uksic=66000 if donorname=="ODL Securities Ltd"
replace uksic=71200 if donorname=="OSL Rail Ltd"
replace uksic=. if donorname=="Oag Worldwide Ltd"
* Digital flight information, intelligence, and analytics for airports
replace uksic=62020 if donorname=="Oag Worldwide Ltd"
replace uksic=68100 if donorname=="Oakgate Group Plc"
replace uksic=68201 if donorname=="Oaklawn Ltd"
replace uksic=55100 if donorname=="Oakley Court Hotel Ltd"
replace uksic=55100 if donorname=="Oakley Hall Park Ltd"
replace uksic=. if donorname=="Oakmont Resources Ltd"
* No information available on this company
replace uksic=62020 if donorname=="Obviam Ltd"
replace uksic=70100 if donorname=="Oceana Investment Corp Ltd"
replace uksic=32130 if donorname=="Oceanic Jewellers Ltd"
replace uksic=66120 if donorname=="Octopus Investments Ltd"
replace uksic=64205 if donorname=="Odey Asset Management Group Ltd"
replace uksic=70100 if donorname=="Offshore Group Newcastle Ltd"
replace uksic=. if donorname=="Ogden Properties Ltd"
* Real estates
replace uksic=68100 if donorname=="Ogden Properties Ltd"
replace uksic=55100 if donorname=="Old Thorns Golf & Country Estate Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Oliver Valvatek Ltd"
* Oil and energy
replace uksic=35000 if donorname=="Oliver Valvatek Ltd"
replace uksic=28140 if donorname=="Oliver Valves Ltd"
replace uksic=96090 if donorname=="Oliver Wyman Ltd"
replace uksic=. if donorname=="Olympic (South) Ltd"
* Suppliers of special needs transport
replace uksic=49000 if donorname=="Olympic (South) Ltd"
replace uksic=78200 if donorname=="Omni Facilities Management Plc"
replace uksic=62020 if donorname=="One Source"
replace uksic=86900 if donorname=="Online Clinic (UK) Ltd"
replace uksic=46180 if donorname=="Orange Aero Ltd"
* took first code mentioned for above
replace uksic=64999 if donorname=="Orbian Management Ltd"
replace uksic=56103 if donorname=="Orient Express Ltd"
replace uksic=46150 if donorname=="Original B.T.C. Ltd"
replace uksic=70229 if donorname=="Osborne & Partners (UK) Ltd"
replace uksic=41100 if donorname=="Otterston Properties Ltd"
replace uksic=63110 if donorname=="Outra Ltd"
replace uksic=. if donorname=="Overseas Packing Company UK Ltd"
* Packaging
replace uksic=82920 if donorname=="Overseas Packing Company UK Ltd"
replace uksic=46720 if donorname=="P & D Northern Steels Ltd"
replace uksic=87900 if donorname=="P J Care Ltd"
replace uksic=. if donorname=="P M B Holdings Ltd"
* No information available on this company
replace uksic=58110 if donorname=="PACKT PUBLISHING LIMITED"
replace uksic=47730 if donorname=="PASAB Ltd"
replace uksic=56302 if donorname=="PB Development Company Ltd"
replace uksic=82990 if donorname=="PDL Ltd"
replace uksic=46190 if donorname=="PG Paper Company Ltd"
replace uksic=. if donorname=="PGC Construction Ltd"
* Construction
replace uksic=41000 if donorname=="PGC Construction Ltd"
replace uksic=87900 if donorname=="PJ Care Ltd"
replace uksic=70221 if donorname=="PJ Hunt Finance Ltd"
replace uksic=58142 if donorname=="PJB Publications Ltd"
replace uksic=41201 if donorname=="PQW Foundry Ltd"
replace uksic=70100 if donorname=="Pacific Investments Plc"
replace uksic=2222 if donorname=="Page Litho Ltd"
replace uksic=41100 if donorname=="Palmer Capital Partners"
replace uksic=61900 if donorname=="Panaram Ltd"
replace uksic=70100 if donorname=="Panther 1919 Ltd"
replace uksic=68100 if donorname=="Panther Securities Plc"
* took first code mentioned for above
replace uksic=47110 if donorname=="Park Garage Group Plc"
replace uksic=41202 if donorname=="Park Lane Homes Ltd"
replace uksic=. if donorname=="Park Place Capital Ltd"
* Financial services
replace uksic=66000 if donorname=="Park Place Capital Ltd"
replace uksic=82990 if donorname=="Parkhill Estates Ltd"
replace uksic=49410 if donorname=="Pass J Holdings Ltd"
replace uksic=70100 if donorname=="Patersons Quarries Ltd"
replace uksic=08110 if donorname=="Patersons of Greenoakhill Ltd"
replace donorname="Patron Capital Ltd" if donorname=="Patron Capital Advisers LLP"
* Real estates
replace uksic=. if donorname=="Patron Capital Ltd"
* Real estates
replace uksic=68100 if donorname=="Patron Capital Ltd"
replace uksic=41202 if donorname=="Paul John Construction (Leicester) Ltd"
replace uksic=82990 if donorname=="Peak One Ltd"
replace uksic=64209 if donorname=="Peak Scientific Holdings Ltd"
replace uksic=82990 if donorname=="Pelham Public Relations Ltd"
replace uksic=22290 if donorname=="Pelicans Manufacturing Company Ltd"
* took first code mentioned for above
replace uksic=41201 if donorname=="Pemican Ltd"
replace uksic=68209 if donorname=="Penhurst Properties Ltd"
replace uksic=41100 if donorname=="Peppercorn Property Investments Ltd"
replace uksic=. if donorname=="Perfect Travel Ltd"
* Asset management
replace uksic=79110 if donorname=="Perfect Travel Ltd"
replace uksic=82990 if donorname=="Peter Hambro Ltd"
replace uksic=43390 if donorname=="Peter Ward Homes Ltd"
replace uksic=82990 if donorname=="Petros Development Company Ltd"
replace uksic=82990 if donorname=="Pets Corner (UK) Ltd"
replace uksic=70229 if donorname=="Phaden Ltd"
replace uksic=70100 if donorname=="Philip J Davies Holdings Plc"
replace uksic=47781 if donorname=="Philip Mould Ltd"
replace uksic=0141 if donorname=="Philip Wilson (Grain) Ltd"
replace uksic=. if donorname=="Phillips, de Pury & Co Ltd"
* Research and investing information
replace uksic=66000 if donorname=="Phillips, de Pury & Co Ltd"
replace uksic=. if donorname=="Philp Mould Ltd"
* Art dealer specialists
replace uksic=47781 if donorname=="Philp Mould Ltd"
replace uksic=18129 if donorname=="Piccadilly Greetings Group Ltd"
replace uksic=41201 if donorname=="Pier (UK) Ltd"
replace uksic=70229 if donorname=="Pietas Consulting Ltd"
replace uksic=70229 if donorname=="Pietas Ltd"
replace uksic=82990 if donorname=="Pilot Group Services Ltd"
replace uksic=43220 if donorname=="Pimlico Plumbers Ltd"
replace uksic=64999 if donorname=="Pinnacle Investment Management"
replace uksic=56210 if donorname=="Planit Events Ltd"
replace uksic=55100 if donorname=="Platinum One Hotels Ltd"
replace uksic=82990 if donorname=="Platon Medical Ltd"
replace uksic=70229 if donorname=="Plena Capital Ltd"
replace uksic=25610 if donorname=="Poeton Industries Ltd"
replace uksic=. if donorname=="Pogson and Davies"
* Clothing
replace uksic=47100 if donorname=="Pogson and Davies"
replace uksic=41100 if donorname=="Polemarch Industrial Ltd"
replace uksic=88990 if donorname=="Political Animal Lobby Ltd"
replace uksic=24450 if donorname=="Port Engineering Ltd"
replace uksic=50200 if donorname=="Portland Harbour Authority Ltd"
replace uksic=50200 if donorname=="Portland Harbour Authority Ltd"
replace uksic=. if donorname=="Precis Holdings Ltd"
* No information available on this company
replace uksic=26110 if donorname=="Precision Varionics International Ltd"
replace uksic=68100 if donorname=="Premier Ground Rents No.1 Ltd"
replace uksic=. if donorname=="Premier Wealth Mgt"
* Financial planning 
replace uksic=66000 if donorname=="Premier Wealth Mgt"
replace uksic=45190 if donorname=="Prentice Aircraft and Cars Ltd"
replace uksic=58142 if donorname=="Preview Publications Ltd"
replace uksic=. if donorname=="PricewaterhouseCoopers LLP"
* Assurance, tax, management consulting  
replace uksic=69203 if donorname=="PricewaterhouseCoopers LLP"
replace uksic=55100 if donorname=="Prima Hotels Ltd"
replace uksic=86900 if donorname=="Principal Healthcare Ltd"
replace uksic=99999 if donorname=="Principle Holdings Ltd"
replace uksic=18129 if donorname=="Printhouse Corporation"
replace uksic=18129 if donorname=="Printhouse Corporation Ltd"
replace uksic=64999 if donorname=="Private Investor Capital Ltd"
replace uksic=68209 if donorname=="Private World Ltd"
* took first code mentioned for above
replace uksic=70229 if donorname=="Progress Industries Ltd"
replace uksic=43999 if donorname=="Project Associates Ltd"
replace uksic=64999 if donorname=="Prospect Investment Management"
replace uksic=. if donorname=="Prowting Investments Plc"
* Real estates
replace uksic=68100 if donorname=="Prowting Investments Plc"
replace uksic=68130 if donorname=="Putterill's of Hertfordshire (Welwyn Garden City)"
replace uksic=64209 if donorname=="QUANTUM PACIFIC CORPORATION UK LIMITED"
replace uksic=. if donorname=="Qualitair Holdings Ltd"
* Provider of HR and staffing services
replace uksic=78300 if donorname=="Qualitair Holdings Ltd"
replace uksic=. if donorname=="Quantum Securities Ltd"
* Specialty finance
replace uksic=66000 if donorname=="Quantum Securities Ltd"
replace uksic=41100 if donorname=="Quinn Estates Ltd"
replace uksic=41201 if donorname=="Quinn Wilson Estates (1) Ltd"
replace uksic=45190 if donorname=="R C Tuxford Exports Ltd"
* took first code mentioned for above
replace uksic=66220 if donorname=="R L Davison & Co Ltd"
replace uksic=70229 if donorname=="R.A.G Associates Ltd"
replace uksic=70100 if donorname=="R20 Ltd"
replace uksic=66300 if donorname=="RAB Capital Plc"
replace uksic=46499 if donorname=="RAGM Plc"
replace uksic=45190 if donorname=="RC Tuxford Exports Ltd"
* took first code mentioned for above
replace uksic=41100 if donorname=="RH Development (Property) Ltd"
replace uksic=70229 if donorname=="RJ Clark Ltd"
replace uksic=70229 if donorname=="RJJ Management Ltd"
replace uksic=70229 if donorname=="RMB Associates Ltd"
replace uksic=70100 if donorname=="RST Residential Investments Ltd"
replace uksic=. if donorname=="RTA Properties Ltd"
* Commercial real estate
replace uksic=68100 if donorname=="RTA Properties Ltd"
replace uksic=85310 if donorname=="RTC Education Ltd"
replace uksic=66300 if donorname=="Rab Capital Ltd"
replace uksic=11070 if donorname=="Radnor Hills Mineral Water Co Ltd"
replace uksic=38110 if donorname=="Rag Collections Ltd"
replace uksic=70110 if donorname=="Rainy City Investments Ltd"
replace uksic=20590 if donorname=="Randox Laboratories Ltd"
replace uksic=68209 if donorname=="Ransom's Dock Ltd"
* took first code mentioned for above
replace uksic=01110 if donorname=="Ransonmoor Farm Ltd"
replace uksic=41201 if donorname=="Rapid Support Services Ltd"
* took first code mentioned for above
replace uksic=96090 if donorname=="Rated Solar Installer Ltd"
replace uksic=. if donorname=="Rawdon & Guiseley Conservative Club Ltd"
* Industrial and provident Society
replace uksic=46760 if donorname=="Raygar Architectural & Engineering Supplies Ltd"
replace uksic=68209 if donorname=="Realreed Ltd"
replace uksic=41100 if donorname=="Realty Estates Ltd"
* took first code mentioned for above
replace uksic=62090 if donorname=="Red Fig Group Ltd"
replace uksic=59112 if donorname=="Red Sky Vision Ltd"
replace uksic=. if donorname=="Redbus Management"
* No information on this company
replace uksic=. if donorname=="Redhill Constitutional Club Ltd"
* No information on this company
replace uksic=. if donorname=="Redwood Care Homes Ltd"
* Homecare services
replace uksic=87100 if donorname=="Redwood Care Homes Ltd"
replace uksic=59140 if donorname=="Reel Cinemas Ltd"
replace uksic=68100 if donorname=="Regenesis Developments Ltd"
* took first code mentioned for above
replace uksic=78109 if donorname=="Regents House Ltd"
replace uksic=68100 if donorname=="Regis Group Services Ltd"
replace uksic=46719 if donorname=="Reliance Europe Ltd"
replace uksic=78109 if donorname=="Renaissance Leadership International Ltd"
replace uksic=70100 if donorname=="Residential Land Holdings Ltd"
replace uksic=41100 if donorname=="Residential Land Ltd"
* took first code mentioned for above
replace uksic=61100 if donorname=="Resilient Networks Plc"
replace uksic=61100 if donorname=="Resilient Plc"
* took first code mentioned for above
replace uksic=78300 if donorname=="ResourceBank Recruitment Ltd"
replace uksic=68209 if donorname=="Retail Ventures Ltd"
replace uksic=. if donorname=="Retail Visual Merchandising Ltd"
* No information on this company
replace uksic=. if donorname=="Rhobuck Ltd"
* No information on this company
replace uksic=. if donorname=="Rhodepark Ltd"
* No information on this company
replace uksic=68320 if donorname=="Rich Estates Ltd"
replace uksic=68100 if donorname=="Rich Investments Ltd"
replace uksic=01110 if donorname=="Richard Johnston Ltd"
* took first code mentioned for above
replace uksic=68100 if donorname=="Richard Morgan & Co Ltd"
replace uksic=46180 if donorname=="Richemont UK Ltd"
* took first code mentioned for above
replace uksic=74990 if donorname=="Rigby Group (RG) Plc"
replace uksic=55100 if donorname=="Ritz Hotel ( London) Ltd, The"
replace uksic=47710 if donorname=="River Island Clothing Co Ltd"
replace uksic=70100 if donorname=="Robert Brett & Sons Ltd"
replace uksic=55100 if donorname=="Robinbest Ltd"
replace uksic=11030 if donorname=="Robinsons Cider Ltd"
replace uksic=7487 if donorname=="Rochland Properties Ltd"
replace uksic=. if donorname=="Root Capital"
* Social investment
replace uksic=66000 if donorname=="Root Capital"
replace uksic=82990 if donorname=="Rosconn Group Ltd"
replace uksic=26520 if donorname=="Rotary Watches Ltd"
* took first code mentioned for above
replace uksic=41202 if donorname=="Rowland Homes Ltd"
replace uksic=70100 if donorname=="Ruxley Ventures Ltd"
replace uksic=64304 if donorname=="S & J Investments (delivery office Southall) Ltd"
replace uksic=. if donorname=="S A Capital Ltd"
* Distributors
replace uksic=64204 if donorname=="S A Capital Ltd"
replace uksic=. if donorname=="S Walsh & Son Ltd"
* Construction
replace uksic=41000 if donorname=="S Walsh & Son Ltd"
replace uksic=70100 if donorname=="S Wernick & Sons (Holdings) Ltd"
replace uksic=. if donorname=="S&J Self Drive Hire"
* Van hire
replace uksic=77110 if donorname=="S&J Self Drive Hire"
replace uksic=82990 if donorname=="S.D. Management Ltd"
replace uksic=. if donorname=="S.E. Land and Estates Ltd"
* specialises in the acquisition of properties for long-term investment and short-term repositioning.
replace uksic=68100 if donorname=="S.E. Land and Estates Ltd"
replace uksic=41100 if donorname=="S.M. Walsh Developments Ltd"
replace uksic=70100 if donorname=="S.Wernick & Sons (Holdings) Ltd"
replace uksic=70100 if donorname=="SCB Holdings Sandy Ltd"
replace uksic=70100 if donorname=="SCM Private LLP"
replace uksic=. if donorname=="SCM Private LLP"
* Wealth management
replace uksic=66000 if donorname=="SCM Private LLP"
replace uksic=68209 if donorname=="SEP Properties Ltd"
replace uksic=78109 if donorname=="SJ Ankh Ltd"
replace uksic=. if donorname=="SME Ltd"
* produces high end tonearms and turntables
replace uksic=25000 if donorname=="SME Ltd"
replace uksic=96090 if donorname=="SMI (Distribution Services) Ltd"
replace uksic=41100 if donorname=="SRS Noble House Services Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="STAC Consultancy LLP"
replace uksic=74909 if donorname=="Safety Management Consultants (UK) Ltd"
replace uksic=. if donorname=="Sainty Hird & Partners Ltd"
* Search firm
replace uksic=64205 if donorname=="Salisbury Kard Ltd"
replace uksic=25990 if donorname=="Salop Design and Engineering Ltd"
replace uksic=10890 if donorname=="Samworth Brothers Ltd"
replace uksic=. if donorname=="Sanderson Asset Management Ltd"
* Asset Management
replace uksic=66000 if donorname=="Sanderson Asset Management Ltd"
replace uksic=70229 if donorname=="Sapinda UK Ltd"
replace uksic=93120 if donorname=="Saracens Ltd"
replace uksic=55100 if donorname=="Sarr Investments"
replace uksic=46420 if donorname=="Savanna Rags International Ltd"
replace uksic=82990 if donorname=="Savills (L&P) Ltd"
replace uksic=68209 if donorname=="Scarborough Constitutional Club"
replace uksic=56101 if donorname=="Scalini Ltd"
replace uksic=68209 if donorname=="Scarborough Constitutional Club"
replace uksic=68209 if donorname=="Scarborough Constitutional Club Co Ltd"
replace uksic=70100 if donorname=="Scottish Power Ltd"
replace uksic=70100 if donorname=="Scottish Power UK Plc"
replace uksic=74909 if donorname=="Scottish Property Group Ltd"
replace uksic=70229 if donorname=="Scythian Ltd"
replace uksic=73110 if donorname=="Seal Communications Ltd"
replace uksic=10120 if donorname=="Seamark Plc"
* took first code mentioned for above
replace uksic=. if donorname=="Second State Pizza Company Ltd"
* Electricity company
replace uksic=68320 if donorname=="Select Property Group Ltd"
replace uksic=. if donorname=="Selfridges Ltd"
* Chain of high-end department stores 
replace uksic=47000 if donorname=="Selfridges Ltd"
replace uksic=68100 if donorname=="Selits Ltd"
replace uksic=64209 if donorname=="Seraphim Group Ltd"
replace uksic=74909 if donorname=="Sethia London Ltd"
replace uksic=68100 if donorname=="Seven Capital Plc"
replace uksic=68201 if donorname=="Shelfside (Holdings) Ltd"
replace uksic=08120 if donorname=="Sherburn Stone Co Ltd"
replace uksic=69102 if donorname=="Shergroup Ltd"
replace uksic=96030 if donorname=="Sherry Funerals"
replace uksic=68100 if donorname=="Shipton Ltd"
* took first code mentioned for above
replace uksic=66190 if donorname=="Shore Capital Group Plc"
replace uksic=64999 if donorname=="Signia Corporate Finance Ltd"
replace uksic=66120 if donorname=="Silver Cloud Ventures Ltd"
* took first code mentioned for above
replace uksic=46499 if donorname=="Silver Cross (UK) Ltd"
replace uksic=55100 if donorname=="SilverDoor Ltd"
* took first code mentioned for above
replace uksic=35110 if donorname=="Simec Uskmouth Power Ltd"
replace uksic=62090 if donorname=="Simmerson Associates Ltd"
replace uksic=. if donorname=="Simon Robertson Associates LLP"
* Asset management
replace uksic=66000 if donorname=="Simon Robertson Associates LLP"
replace uksic=. if donorname=="Richard Sutton Estates Ltd"
* Owning and managing in the hotel, hospitality, farming and real-estate sectors
replace uksic=55100 if donorname=="Richard Sutton Estates Ltd"
replace uksic=41201 if donorname=="Robert McAlpine Ltd"
replace uksic=. if donorname=="Rocco Forte"
* Hotel group
replace uksic=55100 if donorname=="Rocco Forte"
replace uksic=64209 if donorname=="Sita Holdings UK Ltd"
replace uksic=. if donorname=="Site Services & Security Ltd"
* Security gates installer
replace uksic=80200 if donorname=="Site Services & Security Ltd"
replace uksic=56102 if donorname=="Six Senses London Ltd"
replace uksic=41100 if donorname=="Skene Investments (Aberdeen) Ltd"
* took first code mentioned for above
replace uksic=72190 if donorname=="Skidmore Medical Ltd"
replace uksic=47781 if donorname=="Sladmore Gallery"
replace uksic=66300 if donorname=="Slater Investments Ltd"
replace uksic=55100 if donorname=="Sleepwell Hotels UK Ltd"
replace uksic=68100 if donorname=="Slough Estates Plc"
* took first code mentioned for above
replace uksic=82990 if donorname=="Small Business Bureau"
replace uksic=7011 if donorname=="Smee Family Interests Ltd"
* took first code mentioned for above
replace uksic=47190 if donorname=="Smith Bradbeer & Co Ltd"
replace uksic=. if donorname=="Smithfield Consultants Ltd"
* Constructions
replace uksic=41000 if donorname=="Smithfield Consultants Ltd"
replace uksic=70229 if donorname=="Snowshill Allied Holdings Ltd"
replace uksic=56101 if donorname=="Sofra International Ltd"
replace uksic=62090 if donorname=="Soneva Ltd"
replace uksic=64209 if donorname=="Sosafe Ltd"
replace uksic=. if donorname=="South Derbyshire Clay Co. Ltd"
* Financial, mortgage, credit etc.
replace uksic=66000 if donorname=="South Derbyshire Clay Co. Ltd"
replace uksic=. if donorname=="South Fulham Constitutional Club"
* Club
replace uksic=93110 if donorname=="Southend United Football Club Ltd"
replace uksic=. if donorname=="Southend West House of Commons Business Dining Club"
* No information on this company
replace uksic=98000 if donorname=="Southern Grove Pinfold Gate Ltd"
replace uksic=68209 if donorname=="Southrop Estates Ltd"
replace uksic=51102 if donorname=="Sovereign Business Jets Ltd"
replace uksic=82990 if donorname=="Sovereign Strategy Ltd"
replace uksic=68310 if donorname=="Space (L&M) Ltd"
replace uksic=82990 if donorname=="Spicerhaart Group Services Ltd"
replace uksic=87100 if donorname=="Spring View Care Ltd"
replace uksic=25940 if donorname=="Springfast Ltd"
replace uksic=64999 if donorname=="Square Mile Insurance Services"
replace uksic=41100 if donorname=="Squire Estates Ltd"
replace uksic=68100 if donorname=="St Francis Group Ltd"
replace uksic=. if donorname=="St Paul's Printers"
* Press
replace uksic=18129 if donorname=="St Paul's Printers"
replace uksic=82990 if donorname=="St. Medana Holdings Ltd"
replace uksic=70229 if donorname=="Stadium Capital Developments Ltd"
replace uksic=94920 if donorname=="Stalbury Trustees"
replace uksic=41100 if donorname=="Stamford Property Company Ltd"
replace uksic=68209 if donorname=="Stanhill Farms Ltd"
replace uksic=56301 if donorname=="Stanley Ward Conservative Club"
replace uksic=55100 if donorname=="Stapleford Park Ltd"
replace uksic=50200 if donorname=="Star Reefers UK Ltd"
replace uksic=41100 if donorname=="Starbones Ltd"
replace uksic=70229 if donorname=="Steep Investments Ltd"
replace uksic=70100 if donorname=="Stellite Finance Ltd"
replace uksic=20411 if donorname=="Stephenson Group Ltd"
replace uksic=47530 if donorname=="Stercap Ltd"
replace uksic=80200 if donorname=="Stern Advisory Company Ltd"
replace uksic=. if donorname=="Stockcity Ltd"
* No information on this company
replace uksic=68209 if donorname=="Stonegrave Properties Ltd"
replace uksic=68209 if donorname=="Storey Homes"
replace uksic=68100 if donorname=="Storey Property Developments Ltd"
replace uksic=68320 if donorname=="Strand Harbour Securities Ltd"
replace uksic=82990 if donorname=="Strategic Dimensions LLP"
replace uksic=68100 if donorname=="Streamline Office Services Ltd"
replace uksic=56101 if donorname=="Stringfellow Restaurants Ltd"
replace uksic=45111 if donorname=="Subaru (UK) Ltd"
replace uksic=82990 if donorname=="Subsea 7 (UK Service Company) Ltd"
replace uksic=74990 if donorname=="Sudfeld Ltd"
replace uksic=46170 if donorname=="Sun Mark Ltd"
replace uksic=41100 if donorname=="Sunley Estates Plc"
replace uksic=70100 if donorname=="Sunley Holdings Plc"
replace uksic=60100 if donorname=="Sunrise Radio Ltd"
replace uksic=68100 if donorname=="Supreme Property Developments Ltd"
replace uksic=68209 if donorname=="Surbiton Property Company Ltd"
replace uksic=64299 if donorname=="Sussex Research Ltd"
replace uksic=42201 if donorname=="Swan Homes Ltd"
* took first code mentioned for above
replace uksic=27320 if donorname=="Swansea Industrial Components Ltd"
replace uksic=68209 if donorname=="Swanston Holdings Plc"
replace uksic=81201 if donorname=="Sweep Ltd"
* took first code mentioned for above
replace uksic=22290 if donorname=="Synseal Extrusions Ltd"
replace uksic=46130 if donorname=="T G Builders Merchants Ltd"
replace uksic=68209 if donorname=="T Kidd & Son Ltd"
replace uksic=66300 if donorname=="TCI Fund Management Ltd"
replace uksic=. if donorname=="TP Resort Ltd"
* No information on this company
replace uksic=22190 if donorname=="TRP Sealing Systems Ltd"
replace uksic=99999 if donorname=="TSL Education Ltd"
replace uksic=47510 if donorname=="TWM Scotland Ltd"
replace uksic=68320 if donorname=="Tamares Real Estate Investments (UK) Ltd"
replace uksic=55100 if donorname=="Tamasha Ltd"
replace uksic=25940 if donorname=="Tappex Thread Inserts Ltd"
replace uksic=. if donorname=="Tate and Lyle Ltd"
* Supplier of food and beverage
replace uksic=46000 if donorname=="Tate and Lyle Ltd"
replace uksic=25990 if donorname=="Teal Patents Ltd"
replace uksic=99999 if donorname=="Team Modena Ltd"
replace uksic=. if donorname=="Team Origin LLP"
* No information on this company
replace uksic=26110 if donorname=="Techtest Ltd"
* took first code mentioned for above
replace uksic=25110 if donorname=="Tees Components Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Telegraph Group Ltd"
* No information on this company
replace uksic=58130 if donorname=="Telegraph Media Group Ltd"
replace uksic=82990 if donorname=="Teltscher Enterprises Ltd"
replace uksic=68201 if donorname=="Teltscher Industrial Ltd"
replace uksic=66220 if donorname=="Tempcover Ltd"
replace uksic=64999 if donorname=="Temple Capital Finance Ltd"
replace uksic=82990 if donorname=="Tennants of Yorkshire Antique & Fine Art Auctioneers Ltd"
replace uksic=70210 if donorname=="Terrapin Communications"
replace uksic=47110 if donorname=="Tesco Plc"
replace uksic=68209 if donorname=="Texkimp Ltd"
replace uksic=41100 if donorname=="Thakeham Homes Ltd"
replace uksic=. if donorname=="1900 Club"
* No information on this company
replace uksic=68201 if donorname=="33 Group Ltd"
replace uksic=92000 if donorname=="A & S Leisure Group Ltd"
replace uksic=41201 if donorname=="Abbey Manor Group"
* took first code mentioned for above
replace uksic=. if donorname=="Anderson Group"
* Construction and development
replace uksic=41000 if donorname=="Anderson Group"
replace uksic=45112 if donorname=="Artbar Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Association of Conservative Clubs"
* Political association
replace uksic=70229 if donorname=="Avant Guardians Ltd"
replace uksic=55100 if donorname=="Banbury House Hotel"
replace donorname="Biz Club Ltd" if donorname=="Biz Club"
replace uksic=93290 if donorname=="Biz Club Ltd"
replace uksic=68100 if donorname=="Boughton Estates Ltd"
* took first code mentioned for above
replace uksic=64201 if donorname=="Buccleuch Estates Ltd"
replace uksic=64999 if donorname=="Caytrust Finance Co Ltd"
replace donorname="Cayzer Trust Company Ltd" if donorname=="Cayzer Trust Co"
replace uksic=64209 if donorname=="Cayzer Trust Company Ltd"
replace uksic=70229 if donorname=="Chadlington Consultancy Ltd"
replace uksic=95110 if donorname=="Digital Office (UK) Ltd"
replace uksic=82990 if donorname=="Englefield Estate Trust Corporation Ltd"
replace uksic=85100 if donorname=="Eveline Day Nursery Schools Ltd"
replace uksic=70100 if donorname=="Funding Corporation Group Ltd"
replace uksic=55100 if donorname=="Gainsborough Hotel Ltd"
replace uksic=68209 if donorname=="Godalming & Distict Constitutional Club"
replace uksic=47789 if donorname=="Halcyon Gallery"
replace uksic=70100 if donorname=="Halcyon Gallery Ltd"
replace uksic=85310 if donorname=="Harrodian School Ltd"
replace uksic=56210 if donorname=="Hearsum Family Ltd"
* took first code mentioned for above
replace uksic=47710 if donorname=="House of Bruar Ltd"
replace uksic=. if donorname=="Imperial Hotel"
* Hotels
replace uksic=55100 if donorname=="Imperial Hotel"
replace uksic=82990 if donorname=="Lansdowne Hotel (Eastbourne) Ltd"
replace uksic=. if donorname=="London Basement Co Ltd"
* Construction
replace uksic=41000 if donorname=="London Basement Co."
* Construction
replace uksic=90020 if donorname=="London Cabaret Club Ltd"
replace uksic=74990 if donorname=="London Furnishing Company"
replace uksic=. if donorname=="London Heliport Ltd"
* Aviation
replace uksic=52230 if donorname=="London Heliport Ltd"
replace uksic=55100 if donorname=="Maids Head Hotel"
replace uksic=94120 if donorname=="Marketing Society Ltd"
replace uksic=41202 if donorname=="Marlow Building Co. Ltd"
replace uksic=. if donorname=="Mead Corporation"
* produces packaging, coated and specialty papers, and consumer and office products
replace uksic=82920 if donorname=="Mead Corporation"
replace uksic=. if donorname=="R H Group"
* No information on this company
replace uksic=. if donorname=="Redmond Group Ltd"
* took first code mentioned for above
replace uksic=74990 if donorname=="Remuneration Partnership Ltd"
replace uksic=99999 if donorname=="Strategic Communications Alliance Ltd"
replace uksic=82990 if donorname=="Trichological Clinic Ltd"
replace uksic=. if donorname=="Trinity Column Partners LLP"
* Financial and investment advisory
replace uksic=66000 if donorname=="Trinity Column Partners LLP"
replace uksic=56101 if donorname=="Walbrook Club Ltd"
replace uksic=73110 if donorname=="Think BDW Ltd"
replace uksic=68100 if donorname=="Thomas Bates & Son Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Thomas Estates Ltd"
* Gaming, lodging, and restaurants
replace uksic=92000 if donorname=="Thomas Estates Ltd"
replace uksic=82990 if donorname=="Thomas Goode & Co Ltd"
replace uksic=69201 if donorname=="Thomas Nock Martin Ltd"
replace uksic=32990 if donorname=="Thomas Sanderson Ltd"
replace uksic=70221 if donorname=="Thompson Crosby & Co Ltd"
replace uksic=55300 if donorname=="Thorney Bay Park Ltd"
replace uksic=68209 if donorname=="Thornhill Estates Ltd"
replace uksic=41100 if donorname=="Thornwood Investments Ltd"
replace uksic=55900 if donorname=="Three Daggers (Operating) Ltd"
* took first code mentioned for above
replace uksic=45111 if donorname=="Thurlby Motors Ltd"
* took first code mentioned for above
replace uksic=41201 if donorname=="Tide Construction Ltd"
replace uksic=16100 if donorname=="Timberstore Ltd"
replace uksic=27320 if donorname=="Time 24 Ltd"
replace uksic=70229 if donorname=="Time Partners Ltd"
replace uksic=68100 if donorname=="Titan Properties Ltd"
replace uksic=94990 if donorname=="Tom Atkins Group Ltd"
replace uksic=74990 if donorname=="Tompkins UK Ltd"
replace uksic=45200 if donorname=="Tooles Transport Ltd"
* took first code mentioned for above
replace uksic=41100 if donorname=="Topland Group Plc"
replace uksic=99999 if donorname=="Torchcare Ltd"
replace uksic=. if donorname=="Torex Plc"
* No information on this company
replace uksic=. if donorname=="Torpoint & District Unionist Club Ltd"
* No information on this company
replace uksic=38320 if donorname=="Total Reclaims Demolition Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="Totemic Ltd"
replace uksic=96090 if donorname=="Tournerbury Holdings Ltd"
replace uksic=93110 if donorname=="Towcester Racecourse Co. Ltd"
replace uksic=74990 if donorname=="Tower Casino Group Ltd"
replace uksic=46900 if donorname=="Town Mills Craft Centre"
replace uksic=. if donorname=="Trafalgar Risk Mangement & Insurance Consultancy Ltd"
* No information on this company
replace uksic=79110 if donorname=="Trailfinders Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="Tranmere Conservative Club Ltd"
* No information on this company
replace uksic=46900 if donorname=="Trans-Continental Group Ltd"
replace uksic=27320 if donorname=="Tratos Ltd"
replace uksic=96090 if donorname=="Travelex UK Ltd"
replace uksic=68320 if donorname=="Treasury Holdings (UK) Ltd"
replace uksic=62090 if donorname=="Trenchant Ltd"
replace uksic=55201 if donorname=="Trevelgue Leisure Ltd"
replace uksic=62020 if donorname=="Triangle Partnership Ltd"
replace uksic=68320 if donorname=="Tribeca Holdings London Ltd"
replace uksic=96090 if donorname=="Trotter & Co Ltd"
replace uksic=45200 if donorname=="TruckEast Ltd"
replace uksic=56302 if donorname=="Trust Inns Ltd"
replace uksic=56290 if donorname=="Trygon Ltd"
replace uksic=. if donorname=="Tulseglen Ltd"
* No information on this company
replace uksic=51102 if donorname=="Turbine helicoptors Ltd"
replace uksic=41100 if donorname=="Tustin Developments Ltd"
replace uksic=45190 if donorname=="Tuxford Exports Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="Tweedale Advisors Ltd"
replace uksic=68209 if donorname=="Tyler Holdings Ltd"
replace uksic=96090 if donorname=="Tyne Tees Television"
replace uksic=68209 if donorname=="UDI Ltd"
replace uksic=94990 if donorname=="UK Chinese Business Association"
replace uksic=68100 if donorname=="UK Stores Ltd"
replace uksic=63110 if donorname=="UKFAST.NET LIMITED"
replace uksic=68320 if donorname=="UPM Ltd"
replace uksic=70100 if donorname=="Udane Ltd"
* took first code mentioned for above
replace uksic=56101 if donorname=="Ullerglen Ltd"
replace uksic=62090 if donorname=="Ultima Business Solutions Ltd"
replace uksic=. if donorname=="Ultimate Succession LLP"
* No information on this company
replace uksic=70100 if donorname=="Umberslade Corporate Management"
replace uksic=96090 if donorname=="Unatrac Ltd"
replace uksic=40201 if donorname=="Unex Construction Ltd"
* took first code mentioned for above
replace uksic=82990 if donorname=="Unex Finance Ltd"
replace uksic=. if donorname=="Uniastrum Capital Ltd"
* Institutional Financial Svcs
replace uksic=66000 if donorname=="Uniastrum Capital Ltd"
replace uksic=68320 if donorname=="Union Property Services"
replace uksic=41100 if donorname=="Unionist Buildings Ltd"
replace uksic=6202 if donorname=="Unique Network Solutions Ltd"
replace uksic=70100 if donorname=="United Utilities Plc"
replace uksic=96090 if donorname=="Universal Music Operations Ltd"
replace uksic=21100 if donorname=="Universal Products (Lytham) Manufacturing Ltd"
replace uksic=41100 if donorname=="V & P Midlands Ltd"
replace uksic=. if donorname=="V R M (Bicester Village) Ltd"
* Design and fashion
replace uksic=74100 if donorname=="V R M (Bicester Village) Ltd"
replace uksic=62090 if donorname=="VE Interactive Ltd"
replace uksic=10130 if donorname=="Vale of Mowbray Ltd"
replace uksic=68320 if donorname=="Value Retail Management Ltd"
replace uksic=68320 if donorname=="Value Retail Plc"
replace uksic=64999 if donorname=="Vandashield Ltd"
replace uksic=49410 if donorname=="Vanguard Packing Ltd"
* took first code mentioned for above
replace uksic=70229 if donorname=="Vaughan Consulting Ltd"
replace uksic=56302 if donorname=="Vectrix UK Ltd"
replace uksic=10611 if donorname=="Vectrix UK Ltd"
replace uksic=26511 if donorname=="Vehicle Weighing Solutions"
replace uksic=01610 if donorname=="Velcourt Group Plc"
replace uksic=82990 if donorname=="Veling Aviation (UK) Ltd"
replace uksic=47190 if donorname=="Vencomatic Poultry UK Ltd"
replace uksic=79110 if donorname=="Venice Simplon-Orient-Express Ltd"
replace uksic=45111 if donorname=="Venson Automotive Solutions Ltd"
* took first code mentioned for above
replace uksic=41100 if donorname=="Ventress Property Development"
* took first code mentioned for above
replace uksic=58142 if donorname=="Venture Marketing Group Ltd"
* took first code mentioned for above
replace uksic=41100 if donorname=="Vida Healthcare Ltd"
replace uksic=. if donorname=="Viking Office Supplies Ltd"
* Office supply and stationery 
replace uksic=47000 if donorname=="Viking Office Supplies Ltd"
replace uksic=68100 if donorname=="Villagate Properties Ltd"
replace uksic=41202 if donorname=="Village Developments Strategic Land Ltd"
replace uksic=70100 if donorname=="Vincos Ltd"
replace uksic=82990 if donorname=="Vistajet International Ltd"
replace uksic=70100 if donorname=="W & H Elliotts Ltd"
replace uksic=18129 if donorname=="W & J Linney Ltd"
* took first code mentioned for above
replace uksic=46900 if donorname=="W. Wing Yip (London) Ltd"
replace uksic=99999 if donorname=="W.H.Smith & Sons (Tools) Ltd"
replace uksic=82990 if donorname=="WFT London Ltd"
replace uksic=46190 if donorname=="WIGHTMAN INTERNATIONAL Ltd"
replace uksic=68209 if donorname=="Walker & Son (Hauliers) Ltd"
replace uksic=66220 if donorname=="Walsham Brothers & Co Ltd"
replace uksic=64999 if donorname=="Walter Scott & Partners Ltd"
replace uksic=. if donorname=="Waltham Holy Cross Conservative Club"
* Industrial group
replace uksic=10710 if donorname=="Warburtons Ltd"
replace uksic=. if donorname=="Warwick Balfour Capital LLP"
* Capital and investment
replace uksic=66000 if donorname=="Warwick Balfour Capital LLP"
replace uksic=70100 if donorname=="Warwick Holdings Ltd"
replace uksic=32990 if donorname=="Wasdell Packaging Ltd"
replace uksic=70229 if donorname=="Waterford Finance & Investment (UK) Ltd"
replace uksic=82990 if donorname=="Wates Group Services Ltd"
replace uksic=46410 if donorname=="Waxman International Ltd"
replace uksic=01700 if donorname=="Weardale Estates Ltd"
replace uksic=68100 if donorname=="Webb Investments Ltd"
replace uksic=25610 if donorname=="Wedge Group Galvanizing Ltd"
replace uksic=10890 if donorname=="Weetabix Ltd"
replace uksic=45210 if donorname=="Weldon Plant Ltd"
replace uksic=56302 if donorname=="Wellesley Capital Investment Ltd"
replace uksic=. if donorname=="Wellgold LLP"
* Business innovation
replace uksic=74909 if donorname=="Wellgold LLP"
replace uksic=70210 if donorname=="Wellington Pub Company Plc"
replace uksic=93120 if donorname=="West Ham United Football Club Ltd"
replace uksic=78300 if donorname=="West Street Management Services Ltd"
replace uksic=93290 if donorname=="Western Air ( Thruxton) Ltd"
replace uksic=62090 if donorname=="Western United Investments Co Ltd"
replace uksic=41100 if donorname=="Westfield Europe Ltd"
replace uksic=. if donorname=="Westland Helicopters Ltd"
* Aerospace company
replace uksic=30000 if donorname=="Westland Helicopters Ltd"
replace uksic=41202 if donorname=="Weston Homes Group Ltd"
replace uksic=41100 if donorname=="Wharf Land Investments Ltd"
replace uksic=41100 if donorname=="Wheatcroft Land Ltd"
* took first code mentioned for above
replace uksic=. if donorname=="White Star Line Management Company Ltd"
* No information available on this company
replace uksic=50100 if donorname=="White Star Line Management Company Ltd"
replace uksic=64999 if donorname=="Whitechurch Securities Ltd"
replace uksic=70100 if donorname=="Whitworths Holdings Ltd"
replace uksic=73110 if donorname=="Why Media Ltd"
replace uksic=. if donorname=="Wilbraham Securities LLP"
* No information available on this company
replace uksic=66000 if donorname=="Wilbraham Securities LLP"
replace uksic=. if donorname=="Wilf Gilbert (Staffs) Ltd"
* Betting shop
replace uksic=92000 if donorname=="Wilf Gilbert (Staffs) Ltd"
replace uksic=74990 if donorname=="Wilke Property Holdings plc"
replace uksic=64202 if donorname=="William Cook Holdings Ltd"
replace uksic=41100 if donorname=="William Davis Ltd"
replace uksic=92000 if donorname=="William Hill Organisation Ltd"
replace uksic=46420 if donorname=="William Lamb Footwear Ltd"
replace uksic=13100 if donorname=="William S Graham Ltd"
replace uksic=66220 if donorname=="Windsor Partners Ltd"
replace uksic=74909 if donorname=="Winetown Ltd"
replace uksic=66120 if donorname=="Winton Capital Management Ltd"
replace uksic=69201 if donorname=="Wise & Co Accountants Ltd"
replace uksic=68100 if donorname=="Witnesham Ventures Ltd"
replace uksic=10890 if donorname=="Wittington Investments Ltd"
replace uksic=47990 if donorname=="Woburn Enterprises Ltd"
replace uksic=68320 if donorname=="Wolfe Property Services Ltd"
replace uksic=90030 if donorname=="Woodlands School Ltd"
replace uksic=41202 if donorname=="Wooldridge Contractors Ltd"
* took first code mentioned for above
replace uksic=46120 if donorname=="Worcester Tubes Ltd"
replace uksic=78109 if donorname=="Working Links (Employment) Ltd"
replace uksic=77320 if donorname=="Wrights of Crockey Hill Ltd"
replace uksic=65120 if donorname=="Wrightsure Services Ltd"
replace uksic=64999 if donorname=="Wyler Investments Ltd"
replace uksic=45111 if donorname=="XLCR Vehicle Management Ltd"
replace uksic=82990 if donorname=="Xenon Capital Partners Ltd"
replace uksic=32990 if donorname=="Xtratherm UK Ltd"
replace uksic=55100 if donorname=="Yew Lodge Ltd"
replace uksic=68310 if donorname=="Yog Capital (UK) Ltd"
replace uksic=08910 if donorname=="York Potash Ltd"
replace uksic=41100 if donorname=="Yorkshire Developments Ltd"
* took first code mentioned for above
replace uksic=41201 if donorname=="Yorkshire Ventures Ltd"
* took first code mentioned for above
replace uksic=41201 if donorname=="Younger Homes (Northern) Ltd"
replace uksic=74909 if donorname=="Zandra Rhodes Enterprises Ltd"
replace uksic=20411 if donorname=="Zenith Hygiene Systems Limted"
replace uksic=64999 if donorname=="Zeus Capital Ltd"
replace uksic=60200 if donorname=="Zeus Partners Ltd"
replace uksic=68201 if donorname=="Zoe Ashton Ltd"
replace uksic=68201 if donorname=="Zoe Wigan Ltd"
replace uksic=20600 if donorname=="Zyex Ltd"

* Manually classified fin services to fit in more detailed mapping 
replace uksic=66111  if uksic==66000

gen uksic2=uksic
gen construction=1 if uksic2>41099 & uksic<44000
tostring uksic2, replace
replace uksic2=substr(uksic2,1,2)
gen uksic3=uksic
tostring uksic3, replace
replace uksic3=substr(uksic2,1,1)
replace uksic3="68" if uksic2=="68"
replace uksic3="44" if construction==1

encode uksic3, gen(uksic4)

keep donorid2 uksic4 recdate con_biz

* with consistent threshold
bysort donorid2 recdate: egen count_biz=count(con_biz) if con_biz>7499
replace count_biz=0 if count_biz==.

duplicates drop donorid2 recdate, force
tsset donorid2 recdate
tsfill, full
compress
drop if recdate==.
drop if donorid2==.
replace count_biz=0 if count_biz==.

bysort donorid2: egen uksic5=max(uksic4)
drop uksic4

sort donorid2 recdate

gen monthly=mofd(recdate)
gen year=yofd(recdate)
gen trend=_n

* PLEASE use your own path to access the dataset ICM uploaded with this submission
merge m:m monthly using "G:\My Drive\Meanma\Badanie\Funduszy\2017-18\Sasana\Wlasnosc\ICM.dta", keepusing(CONLEADOVERLABOURpercentage)

drop monthly year
gen month=month(recdate)
gen day=day(recdate)
gen year=year(recdate)
replace CONLEADOVERLABOURpercentage=.05 if day==27 & month==8 & year==2016
replace CONLEADOVERLABOURpercentage=.08 if day==23 & month==7 & year==2016
replace CONLEADOVERLABOURpercentage=.02 if day==9 & month==7 & year==2016
replace CONLEADOVERLABOURpercentage=.08 if day==19 & month==11 & year==2016
replace CONLEADOVERLABOURpercentage=.06 if day==26 & month==11 & year==2016
replace CONLEADOVERLABOURpercentage=.10 if day==8 & month==10 & year==2016
replace CONLEADOVERLABOURpercentage=.08 if day==29 & month==10 & year==2016
replace CONLEADOVERLABOURpercentage=.07 if day==10 & month==9 & year==2016
replace CONLEADOVERLABOURpercentage=.11 if day==1 & month==4 & year==2017
replace CONLEADOVERLABOURpercentage=-.02 if day==27 & month==8 & year==2017
replace CONLEADOVERLABOURpercentage=.13 if day==18 & month==4 & year==2017
replace CONLEADOVERLABOURpercentage=.14 if day==23 & month==4 & year==2017
replace CONLEADOVERLABOURpercentage=.20 if day==13 & month==5 & year==2017
replace CONLEADOVERLABOURpercentage=.12 if day==30 & month==4 & year==2017
replace CONLEADOVERLABOURpercentage=.10 if day==18 & month==2 & year==2017
replace CONLEADOVERLABOURpercentage=.08 if day==4 & month==2 & year==2017
replace CONLEADOVERLABOURpercentage=.09 if day==21 & month==1 & year==2017
replace CONLEADOVERLABOURpercentage=.07 if day==7 & month==1 & year==2017
replace CONLEADOVERLABOURpercentage=.10 if day==4 & month==3 & year==2017
replace CONLEADOVERLABOURpercentage=.13 if day==18 & month==3 & year==2017
replace CONLEADOVERLABOURpercentage=.06 if day==20 & month==5 & year==2017
replace CONLEADOVERLABOURpercentage=.15 if day==6 & month==5 & year==2017
replace CONLEADOVERLABOURpercentage=.03 if day==28 & month==5 & year==2017
replace CONLEADOVERLABOURpercentage=.04 if day==3 & month==6 & year==2017
replace CONLEADOVERLABOURpercentage=.05 if day==7 & month==6 & year==2017
replace CONLEADOVERLABOURpercentage=-.04 if day==15 & month==7 & year==2017
replace CONLEADOVERLABOURpercentage=-.05 if day==2 & month==7 & year==2017
replace CONLEADOVERLABOURpercentage=-.03 if day==11 & month==11 & year==2017
replace CONLEADOVERLABOURpercentage=-.03 if day==7 & month==10 & year==2017
replace CONLEADOVERLABOURpercentage=-.02 if day==9 & month==9 & year==2017
replace CONLEADOVERLABOURpercentage=-.03 if day==23 & month==9 & year==2017
replace CONLEADOVERLABOURpercentage=-.04 if day==3 & month==3 & year==2018
replace CONLEADOVERLABOURpercentage=.05 if day==10 & month==12 & year==2016
replace CONLEADOVERLABOURpercentage=-.02 if day==3 & month==2 & year==2018
replace CONLEADOVERLABOURpercentage=.06 if day==14 & month==8 & year==2016
replace CONLEADOVERLABOURpercentage=-.03 if day==13 & month==1 & year==2018
replace CONLEADOVERLABOURpercentage=.04 if day==25 & month==6 & year==2016
replace CONLEADOVERLABOURpercentage=-.03 if day==25 & month==11 & year==2017

replace CONLEADOVERLABOURpercentage=.02 if day==29 & month==10 & year==2018
replace CONLEADOVERLABOURpercentage=.03 if day==10 & month==9 & year==2018
replace CONLEADOVERLABOURpercentage=0 if day==20 & month==8 & year==2018
replace CONLEADOVERLABOURpercentage=-.01 if day==6 & month==8 & year==2018
replace CONLEADOVERLABOURpercentage=-.01 if day==23 & month==7 & year==2018
replace CONLEADOVERLABOURpercentage=.02 if day==9 & month==7 & year==2018
replace CONLEADOVERLABOURpercentage=.01 if day==25 & month==6 & year==2018
replace CONLEADOVERLABOURpercentage=.03 if day==30 & month==5 & year==2018
replace CONLEADOVERLABOURpercentage=.03 if day==14 & month==5 & year==2018
replace CONLEADOVERLABOURpercentage=.03 if day==30 & month==4 & year==2018
replace CONLEADOVERLABOURpercentage=.01 if day==9 & month==4 & year==2018
replace CONLEADOVERLABOURpercentage=.03 if day==19 & month==3 & year==2018
replace CONLEADOVERLABOURpercentage=.01 if day==5 & month==3 & year==2018
replace CONLEADOVERLABOURpercentage=.01 if day==5 & month==2 & year==2018
replace CONLEADOVERLABOURpercentage=-.01 if day==15 & month==1 & year==2018
replace CONLEADOVERLABOURpercentage=.02 if day==12 & month==12 & year==2017
replace CONLEADOVERLABOURpercentage=0 if day==27 & month==11 & year==2017

* The following are from Omnium, the previous are from ICM

replace CONLEADOVERLABOURpercentage=-.05 if day==31 & month==5 & year==2019
replace CONLEADOVERLABOURpercentage=-.04 if day==17 & month==5 & year==2019
replace CONLEADOVERLABOURpercentage=-.06 if day==8 & month==5 & year==2019
replace CONLEADOVERLABOURpercentage=-.07 if day==23 & month==4 & year==2019
replace CONLEADOVERLABOURpercentage=-.07 if day==9 & month==4 & year==2019
replace CONLEADOVERLABOURpercentage=0 if day==28 & month==3 & year==2019
replace CONLEADOVERLABOURpercentage=.03 if day==20 & month==3 & year==2019
replace CONLEADOVERLABOURpercentage=.04 if day==13 & month==3 & year==2019
replace CONLEADOVERLABOURpercentage=.06 if day==26 & month==2 & year==2019
replace CONLEADOVERLABOURpercentage=.08 if day==20 & month==2 & year==2019
replace CONLEADOVERLABOURpercentage=0 if day==13 & month==2 & year==2019
replace CONLEADOVERLABOURpercentage=.07 if day==30 & month==1 & year==2019
replace CONLEADOVERLABOURpercentage=-.03 if day==16 & month==1 & year==2019
replace CONLEADOVERLABOURpercentage=0 if day==18 & month==12 & year==2018
replace CONLEADOVERLABOURpercentage=-.01 if day==13 & month==12 & year==2018


*drop _merge treat month day year
*drop _merge month day year con_biz trend
drop _merge month day year trend
ipolate CONLEADOVERLABOURpercentage recdate, generate(conlead_ipo)

gen elec_count=recdate-7063
replace elec_count=recdate-8557 if recdate>8556
replace elec_count=recdate-10023 if recdate>10022
replace elec_count=recdate-11787 if recdate>11786
replace elec_count=recdate-13635 if recdate>13634
replace elec_count=recdate-15133 if recdate>15132
replace elec_count=recdate-16561 if recdate>16561
replace elec_count=recdate-18388 if recdate>18388
replace elec_count=recdate-20215 if recdate>20215
replace elec_count=recdate-20978 if recdate>20978


* from dissolution of parliament to election
gen campaign=0
replace campaign=1 if recdate>8532 & recdate<8557
replace campaign=1 if recdate>9998 & recdate<10023
replace campaign=1 if recdate>11757 & recdate<11787
replace campaign=1 if recdate>13611 & recdate<13635
replace campaign=1 if recdate>15105 & recdate<15133
replace campaign=1 if recdate>16536 & recdate<16562
replace campaign=1 if recdate>18363 & recdate<18389
replace campaign=1 if recdate>20176 & recdate<20216
replace campaign=1 if recdate>20941 & recdate<20979

gen gov=0
* from date of coalition agreement
replace gov=1 if recdate>18393

bysort donorid2: egen mean_count=mean(count_biz)
drop if mean_count==0
drop mean_count
gen count_biz_bi=1 if count_biz>0
replace count_biz_bi=0 if count_biz_bi==.

set more off

tabulate uksic5, generate(uksic_)
drop if uksic_1==1
drop uksic_1
rename uksic_2 uksic_1
rename uksic_3 uksic_2
rename uksic_4 uksic_3
rename uksic_5 uksic_4
rename uksic_6 uksic_44
rename uksic_7 uksic_5
rename uksic_8 uksic_6
rename uksic_9 uksic_68
rename uksic_10 uksic_7
rename uksic_11 uksic_8
rename uksic_12 uksic_9

set matsize 4068
tsset donorid2 recdate
gen trend=recdate-18388

gen prop=count_biz_bi*uksic_68
summarize prop

gen construct=count_biz_bi*uksic_44
summarize construct

bysort recdate: egen prop_total=total(prop)
summarize prop_total

bysort recdate: egen construct_total=total(construct)
summarize construct_total

gen sic1donation=count_biz_bi*uksic_1
gen sic2donation=count_biz_bi*uksic_2
gen sic3donation=count_biz_bi*uksic_3
gen sic4donation=count_biz_bi*uksic_4
gen sic5donation=count_biz_bi*uksic_5
gen sic6donation=count_biz_bi*uksic_6
gen sic7donation=count_biz_bi*uksic_7
gen sic8donation=count_biz_bi*uksic_8
gen sic9donation=count_biz_bi*uksic_9

gen otherdonation=sic1donation+sic2donation+sic3donation+sic4donation+sic5donation+sic6donation+sic7donation+sic8donation+sic9donation
bysort recdate: egen other_total=total(otherdonation)

bysort recdate: egen uksic_1_total=total(sic1donation)
bysort recdate: egen uksic_2_total=total(sic2donation)
bysort recdate: egen uksic_3_total=total(sic3donation)
bysort recdate: egen uksic_4_total=total(sic4donation)
bysort recdate: egen uksic_5_total=total(sic5donation)
bysort recdate: egen uksic_6_total=total(sic6donation)
bysort recdate: egen uksic_7_total=total(sic7donation)
bysort recdate: egen uksic_8_total=total(sic8donation)
bysort recdate: egen uksic_9_total=total(sic9donation)

summarize other_total uksic_1_total uksic_2_total uksic_3_total uksic_4_total uksic_5_total uksic_6_total uksic_7_total uksic_8_total uksic_9_total prop_total construct_total

egen sectorcount=count(donorid2), by (uksic5)
replace sectorcount=sectorcount/7051
*(maxdate-mindate)+1


duplicates drop recdate, force
gen date=recdate
format %td date

lowess prop_total date, generate (prop_total_lowess) bwidth(0.25) nograph
lowess construct_total date, generate (construct_total_lowess) bwidth(0.25) nograph
lowess other_total date, generate (other_total_lowess) bwidth(0.25) nograph

gen sum2=prop_total_lowess+construct_total_lowess
gen sum3=prop_total_lowess+construct_total_lowess+other_total_lowess

* Fig A1
twoway (area prop_total_lowess date) (rarea prop_total_lowess sum2 date) (rarea sum2 sum3 date)

gen propconstruct=(prop_total_lowess+construct_total_lowess)/(prop_total_lowess+construct_total_lowess+other_total_lowess)
* min .1979893 max .3075931 mean .2259244

ssc install estout

* Table 4
eststo: glm prop_total campaign elec_count gov conlead_ipo trend, family(nbinomial 1) vce(hac nwest) eform
eststo: glm construct_total campaign elec_count gov conlead_ipo trend, family(nbinomial 1) vce(hac nwest) eform
eststo: glm other_total campaign elec_count gov conlead_ipo trend, family(nbinomial 1) vce(hac nwest) eform

esttab using example.rtf, se eform

* Table A1
summarize campaign elec_count gov conlead_ipo if conlead_ipo!=.

* End of IGA article







